From a33fbd0638fabd3b0c9db65b865dd6859c623287 Mon Sep 17 00:00:00 2001 From: komalsheth286 Date: Fri, 2 Dec 2016 12:01:48 +0530 Subject: Day-2 Schedule added --- website/templates/base.html | 48 +++++++++++- website/views.py | 176 +++++++++++++++++++++++--------------------- 2 files changed, 138 insertions(+), 86 deletions(-) diff --git a/website/templates/base.html b/website/templates/base.html index eaca7d8..7833c51 100755 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -329,8 +329,52 @@

11 Dec 2016: Day 2

- - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Conference and talks
Talk
Speaker
Package ensemble : A package to create ensemble Machine Learning modelsPrajwal Kailas
Python & Caffe : Getting started with Deep Learning / Deep Learning DemystifiedSaurabh Kumar
Extracting structured data from Millions of Mobile SMS Messages - From Conception to ProductionVineesha Budhrani
Using Analytics to Unpack Your Financial Biography from CIBILKedar Deore
Scientific Python in Disaster Simulation and Visualization : Modeling and Simulation of WildlandFire Spread using CAN ModelGugan Selvaraj
Processing medium-sized data with Python, Pandas and PostgresChinmay Kanchi
Learn the Brain with NilearnKamalaker Dadi
Developing Python Backends for Machine Learning ApplicationsJaidev Deshpande
Good Enough Practices for Scientific Computing in PythonPankaj Pandey
Compressive Sensing: A glimpse into the Magic Reconstruction using PythonSaurabh Kumar
Raspberry PI based Smart Greenhouse for environment monitoring and controlSaiprasad Barke
diff --git a/website/views.py b/website/views.py index 46b1999..3f6a46c 100755 --- a/website/views.py +++ b/website/views.py @@ -150,6 +150,7 @@ def submitcfp(request): if form.is_valid(): data = form.save(commit=False) data.user = django_user + data.email = social_user.email data.save() context['proposal_submit'] = True sender_name = "SciPy India 2016" @@ -202,6 +203,7 @@ def submitcfw(request): if form.is_valid(): data = form.save(commit=False) data.user = django_user + data.email = social_user.email data.save() context['proposal_submit'] = True sender_name = "SciPy India 2016" @@ -308,24 +310,27 @@ def abstract_details(request, proposal_id=None): proposals = Proposal.objects.all() context['proposals'] = proposals context['user'] = user - return render(request, 'abstract_details.html', context) + return render(request, 'cfp.html', context) elif user is not None: - proposal = Proposal.objects.get(id=proposal_id) - print "------------------> owner",proposal.user - if proposal.user == user: - try: - url = '/2016'+str(proposal.attachment.url) - context['url'] = url - except: - pass - comments = Comments.objects.filter(proposal=proposal) - context['proposal'] = proposal - context['user'] = user - context['comments'] = comments - path, filename = os.path.split(str(proposal.attachment)) - context['filename'] = filename - return render(request, 'abstract-details.html', context) - else: + try: + proposal = Proposal.objects.get(id=proposal_id) + print "------------------> owner",proposal.user + if proposal.user == user: + try: + url = '/2016'+str(proposal.attachment.url) + context['url'] = url + except: + pass + comments = Comments.objects.filter(proposal=proposal) + context['proposal'] = proposal + context['user'] = user + context['comments'] = comments + path, filename = os.path.split(str(proposal.attachment)) + context['filename'] = filename + return render(request, 'abstract-details.html', context) + else: + return render(request, 'cfp.html', context) + except: return render(request, 'cfp.html', context) else: return render(request, 'cfp.html', context) @@ -377,75 +382,78 @@ def comment_abstract(request, proposal_id = None): context = {} if user.is_authenticated(): if user.is_superuser : - proposal = Proposal.objects.get(id=proposal_id) try: - url = '/2016'+str(proposal.attachment.url) - context['url'] = url + proposal = Proposal.objects.get(id=proposal_id) + try: + url = '/2016'+str(proposal.attachment.url) + context['url'] = url + except: + pass + if request.method == 'POST': + comment = Comments() + comment.comment = request.POST['comment'] + comment.user = user + comment.proposal = proposal + comment.save() + comments = Comments.objects.filter(proposal=proposal) + sender_name = "SciPy India 2016" + sender_email = "scipy@fossee.in" + to = (proposal.user.email, "scipy@fossee.in" ) + if proposal.proposal_type == 'ABSTRACT': + subject = "SciPy India 2016 - Comment on Your talk Proposal" + message = """ + Dear {0},

+ There is a comment posted on your proposal for the talk titled {1}.
+ Once we receive your response, you will be notified regarding further comments/acceptance/ rejection of your talk/workshop via email. + Visit this link {2} to view comments on your submission.

+ Thank You !

Regards,
SciPy India 2016,
FOSSEE - IIT Bombay. + """.format( + proposal.user.first_name, + proposal.title, + 'http://scipy.in/2016/abstract-details/' + str(proposal.id), + ) + elif proposal.proposal_type =='WORKSHOP': + subject = "SciPy India 2016 - Comment on Your Workshop Proposal" + message = """ + Dear {0},

+ There is a comment posted on your proposal for the workshop titled {1}.
+ Once we receive your response, you will be notified regarding further comments/acceptance/ rejection of your talk/workshop via email. + Visit this {2} link to view comments on your submission.

+ Thank You !

Regards,
SciPy India 2016,
FOSSEE - IIT Bombay. + """.format( + proposal.user.first_name, + proposal.title, + 'http://scipy.in/2016/abstract-details/' + str(proposal.id), + ) + email = EmailMultiAlternatives( + subject,'', + sender_email, to, + headers={"Content-type":"text/html;charset=iso-8859-1"} + ) + email.attach_alternative(message, "text/html") + email.send(fail_silently=True) + proposal.status="Commented" + proposal.save() + rates = Ratings.objects.filter(proposal=proposal) + context['rates'] = rates + context['proposal'] = proposal + context['comments'] = comments + path, filename = os.path.split(str(proposal.attachment)) + context['filename'] = filename + context.update(csrf(request)) + return render(request, 'comment-abstract.html', context) + else: + comments = Comments.objects.filter(proposal=proposal) + rates = Ratings.objects.filter(proposal=proposal) + context['rates'] = rates + context['proposal'] = proposal + context['comments'] = comments + path, filename = os.path.split(str(proposal.attachment)) + context['filename'] = filename + context.update(csrf(request)) + return render(request, 'comment-abstract.html', context) except: - pass - if request.method == 'POST': - comment = Comments() - comment.comment = request.POST['comment'] - comment.user = user - comment.proposal = proposal - comment.save() - comments = Comments.objects.filter(proposal=proposal) - sender_name = "SciPy India 2016" - sender_email = "scipy@fossee.in" - to = (proposal.user.email, "scipy@fossee.in" ) - if proposal.proposal_type == 'ABSTRACT': - subject = "SciPy India 2016 - Comment on Your talk Proposal" - message = """ - Dear {0},

- There is a comment posted on your proposal for the talk titled {1}.
- Once we receive your response, you will be notified regarding further comments/acceptance/ rejection of your talk/workshop via email. - Visit this link {2} to view comments on your submission.

- Thank You !

Regards,
SciPy India 2016,
FOSSEE - IIT Bombay. - """.format( - proposal.user.first_name, - proposal.title, - 'http://scipy.in/2016/abstract-details/' + str(proposal.id), - ) - elif proposal.proposal_type =='WORKSHOP': - subject = "SciPy India 2016 - Comment on Your Workshop Proposal" - message = """ - Dear {0},

- There is a comment posted on your proposal for the workshop titled {1}.
- Once we receive your response, you will be notified regarding further comments/acceptance/ rejection of your talk/workshop via email. - Visit this {2} link to view comments on your submission.

- Thank You !

Regards,
SciPy India 2016,
FOSSEE - IIT Bombay. - """.format( - proposal.user.first_name, - proposal.title, - 'http://scipy.in/2016/abstract-details/' + str(proposal.id), - ) - email = EmailMultiAlternatives( - subject,'', - sender_email, to, - headers={"Content-type":"text/html;charset=iso-8859-1"} - ) - email.attach_alternative(message, "text/html") - email.send(fail_silently=True) - proposal.status="Commented" - proposal.save() - rates = Ratings.objects.filter(proposal=proposal) - context['rates'] = rates - context['proposal'] = proposal - context['comments'] = comments - path, filename = os.path.split(str(proposal.attachment)) - context['filename'] = filename - context.update(csrf(request)) - return render(request, 'comment-abstract.html', context) - else: - comments = Comments.objects.filter(proposal=proposal) - rates = Ratings.objects.filter(proposal=proposal) - context['rates'] = rates - context['proposal'] = proposal - context['comments'] = comments - path, filename = os.path.split(str(proposal.attachment)) - context['filename'] = filename - context.update(csrf(request)) - return render(request, 'comment-abstract.html', context) + return render(request, 'cfp.html', context) else: return render(request, 'cfp.html', context) else: -- cgit