diff options
author | Komal Sheth | 2016-10-05 17:37:56 +0530 |
---|---|---|
committer | GitHub | 2016-10-05 17:37:56 +0530 |
commit | 43d79cf73e0e89283ff5ba2e9b201ef1db464da2 (patch) | |
tree | 6650d75d736cfe8f3fd1c655682d09aa94a99d32 | |
parent | 0181183235e155575fdc80a3e3cee659c481c443 (diff) | |
parent | 38fc83a385ccd153dab2204521a3727ba7c1b019 (diff) | |
download | SciPy2016-43d79cf73e0e89283ff5ba2e9b201ef1db464da2.tar.gz SciPy2016-43d79cf73e0e89283ff5ba2e9b201ef1db464da2.tar.bz2 SciPy2016-43d79cf73e0e89283ff5ba2e9b201ef1db464da2.zip |
Merge pull request #24 from FOSSEE/Home_page
New FB and google plus links added
-rwxr-xr-x | website/templates/base.html | 8 | ||||
-rwxr-xr-x | website/templates/view-abstracts.html | 11 | ||||
-rwxr-xr-x | website/views.py | 69 |
3 files changed, 62 insertions, 26 deletions
diff --git a/website/templates/base.html b/website/templates/base.html index a9ac680..e196699 100755 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -25,7 +25,7 @@ <p style="color:#484848; font-weight:700; font-size:28px;" >DECEMBER 10 & 11</p><br><br>
<a href="#attend" class="button special" style="width : 220px;" >Register</a></center>
- <a href="{% url 'website:cfp' %}" class="button special" style="width : 220px;">Submit</a></center>
+ <a href="{% url 'website:cfp' %}" class="button special" style="width : 220px;">Submit</a>
</header>
{% endblock %}
@@ -246,7 +246,7 @@ <p>Do not insult or put down attendees or engage in any action that violates the open, welcoming and sharing spirit of the conference. Be kind and sensitive to the people around you when you are attending the conference, and avoid any kind of offensive or degrading behavior.</p>
-<p>If a participant engages in behavior that violates this code of conduct, the conference organizers may take any action they deem appropriate, including warning the offender or expulsion from the conference with no refund.</p>
+<p><b>If a participant engages in behavior that violates this code of conduct, the conference organizers may take any action they deem appropriate, including warning the offender or expulsion from the conference with no refund.</b></p>
<p>Thank you for helping to make SciPy India a welcoming, friendly event for all.</p>
@@ -423,8 +423,8 @@ </dl>
<ul class="icons">
<li><a style="color:white;" target="_blank" href="https://twitter.com/scipyindia" class="icon-twitter alt"><span class="label"></span></a></li>
- <li><a style="color:white;" target="_blank" href="https://www.facebook.com/scipydotin" class="icon-facebook alt"><span class="label"></span></a></li>
- <li><a style="color:white;" target="_blank" href="https://plus.google.com/+ScipyIndia/posts" class="icon-google-plus alt"><span class="label"></span></a></li>
+ <li><a style="color:white;" target="_blank" href="https://www.facebook.com/scipyindia2016/" class="icon-facebook alt"><span class="label"></span></a></li>
+ <li><a style="color:white;" target="_blank" href="https://plus.google.com/103605487308376724082" class="icon-google-plus alt"><span class="label"></span></a></li>
</ul>
Visit SciPy.in/
diff --git a/website/templates/view-abstracts.html b/website/templates/view-abstracts.html index 619657d..f40ca76 100755 --- a/website/templates/view-abstracts.html +++ b/website/templates/view-abstracts.html @@ -54,7 +54,7 @@ You have not submitted any proposal. To submit proposal click <a href="{% url 'w {% else %} - <form action="{% url 'website:status_change' %}" method="post" onsubmit="return confirm('Sure?');"> {% csrf_token %} + <form action="{% url 'website:status_change' %}" method="post" onsubmit="return confirm('Are You Sure?');"> {% csrf_token %} <table id = "myTable" class="tablesorter"> @@ -93,9 +93,12 @@ You have not submitted any proposal. To submit proposal click <a href="{% url 'w <th> Status {% for proposal in proposals %} <tr> - {% if user.is_superuser %} - <td><center> <input type = "checkbox" name="delete_proposal" value = {{proposal.id}}></input></center></td> - + {% if user.is_superuser %} + <td> + {% if proposal.status = 'Rejected' %} + {% else %} + <center> <input type = "checkbox" name="delete_proposal" value = {{proposal.id}}></input></center></td> + {% endif %} <td> {{ proposal.user.get_full_name}} </td> diff --git a/website/views.py b/website/views.py index 48242c7..5ce2666 100755 --- a/website/views.py +++ b/website/views.py @@ -44,8 +44,9 @@ def userregister(request): else: form.save() context['registration_complete'] = True - # form = UserLoginForm() - # context['form'] = form + form = UserLoginForm() + context['form'] = form + context['user'] = request.user return render_to_response('cfp.html', context) else: context.update(csrf(request)) @@ -257,7 +258,9 @@ def view_abstracts(request): else: return render(request, 'cfp.html') else: - return render(request, 'cfp.html') + form = UserLoginForm() + context['form'] = form + return render(request, 'cfp.html', context) def edit_proposal(request, proposal_id = None): @@ -351,7 +354,6 @@ def rate_proposal(request, proposal_id = None): return render(request, 'comment-abstract.html', context) else: return render(request, 'comment-abstract.html', context) - return render(request, 'comment-abstract.html', context) @@ -425,7 +427,9 @@ def comment_abstract(request, proposal_id = None): context.update(csrf(request)) return render(request, 'comment-abstract.html', context) else: - return render(request, 'comment-abstract.html', context) + form = UserLoginForm() + context['form'] = form + return render(request, 'cfp.html', context) @@ -443,12 +447,12 @@ def status(request, proposal_id= None): if proposal.proposal_type == 'ABSTRACT': subject = "SciPy India 2016 - Talk Proposal Accepted" message = """Dear """+proposal.user.first_name+""", - Congratulations. Your proposal for the talk titled '"""+ proposal.title+ """' is accepted. + Congratulations. Your proposal for the talk titled '"""+ proposal.title+ """'is accepted. You shall present the talk at the conference.\n\nYou will be notified regarding instructions of your talk via email.\n\nThank You ! \n\nRegards,\nSciPy India 2016,\nFOSSEE - IIT Bombay""" elif proposal.proposal_type == 'WORKSHOP': subject = "SciPy India 2016 - Workshop Proposal Accepted" message = """Dear """+proposal.user.first_name+""", - Congratulations. Your proposal for the workshop titled '"""+ proposal.title+ """' is accepted. + Congratulations. Your proposal for the workshop titled '"""+ proposal.title+ """'is accepted. You shall conduct the workshop at the conference.\n\nYou will be notified regarding instructions of your workshop via email.\n\nThank You ! \n\nRegards,\nSciPy India 2016,\nFOSSEE - IIT Bombay""" send_mail(subject, message, sender_email, to) context.update(csrf(request)) @@ -461,28 +465,57 @@ def status(request, proposal_id= None): if proposal.proposal_type == 'ABSTRACT': subject = "SciPy India 2016 - Talk Proposal Rejected" message = """Dear """+proposal.user.first_name+""", - We regret to inform you that your proposal for the talk titled '"""+ proposal.title+ """' has not been shortlisted. - You may register and attend the conference by clicking http://scipyindia2016.doattend.com/. + We regret to inform you that your proposal for the talk titled '"""+ proposal.title+ """' as not been shortlisted.<br> + You may register and attend the conference by clicking http://scipyindia2016.doattend.com/ \n\nThank You ! \n\nRegards,\nSciPy India 2016,\nFOSSEE - IIT Bombay""" elif proposal.proposal_type == 'WORKSHOP': subject = "SciPy India 2016 - Workshop Proposal Rejected" message = """Dear """+proposal.user.first_name+""", - We regret to inform you that your proposal for the workshop titled '"""+ proposal.title+ """' has not been shortlisted. - You may register and attend the conference by clicking http://scipyindia2016.doattend.com/. + We regret to inform you that your proposal for the workshop titled '"""+ proposal.title+ """' as not been shortlisted.<br> + You may register and attend the conference by clicking http://scipyindia2016.doattend.com/ \n\nThank You ! \n\nRegards,\nSciPy India 2016,\nFOSSEE - IIT Bombay""" send_mail(subject, message, sender_email, to) context.update(csrf(request)) elif 'resubmit' in request.POST: - proposal.status="Edit" - proposal.save() + to = (proposal.user.email, "scipy@fossee.in" ) sender_name = "SciPy India 2016" sender_email = "scipy@fossee.in" - subject = "SciPy India - Resubmit" - to = (proposal.user.email, "scipy@fossee.in") - message = """Dear """+proposal.user.first_name+""",\n\nThank You ! \n\nRegards,\nSciPy India 2016,\nFOSSEE - IIT Bombay""" - send_mail(subject, message, sender_email, to) + if proposal.proposal_type == 'ABSTRACT': + subject = "SciPy India 216 - Talk Proposal Resumbmission" + message = """ + Dear {0}, <br><br> + Thank you for showing interest & submitting a talk proposal at SciPy India 2016 conference for the talk titled <b>"{1}"</b>. You are requested to submit this talk proposal once again.<br> + You will be notified regarding comments/selection/rejection of your talk via email. + Visit this {2} link to view comments on your submission.<br><br> + Thank You ! <br><br>Regards,<br>SciPy India 2016,<br>FOSSEE - IIT Bombay. + """.format( + proposal.user.first_name, + proposal.title, + 'http://scipy.in/2016/view-abstracts/' + ) + elif proposal.proposal_type =='WORKSHOP': + subject = "SciPy India 216 - Workshop Proposal Resubmission" + message = """ + Thank you for showing interest & submitting a workshop proposal at SciPy India 2016 conference for the workshop titled <b>"{1}"</b>. You are requested to submit this talk proposal once again.<br> + You will be notified regarding comments/selection/rejection of your workshop via email. + Visit this {2} link to view comments on your submission.<br><br> + Thank You ! <br><br>Regards,<br>SciPy India 2016,<br>FOSSEE - IIT Bombay. + """.format( + proposal.user.first_name, + proposal.title, + 'http://scipy.in/2016/view-abstracts/' + ) + 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="Edit" + proposal.save() context.update(csrf(request)) - proposals = Proposal.objects.all() + proposals = Proposal.objects.all().order_by('status') context['proposals'] = proposals context['user'] = user return render(request, 'view-abstracts.html', context) |