diff options
Diffstat (limited to 'website/views.py')
-rw-r--r-- | website/views.py | 100 |
1 files changed, 39 insertions, 61 deletions
diff --git a/website/views.py b/website/views.py index d45db5f..35686e7 100644 --- a/website/views.py +++ b/website/views.py @@ -480,29 +480,12 @@ def comment_abstract(request, proposal_id=None): subject = "NCCPS 2018 - Comment on Your talk Proposal" message = """ Dear {0}, <br><br> - There is a comment posted on your proposal for the talk titled <b>{1}</b>.<br> - 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.<br><br> + There is a comment posted on your proposal titled <b>{1}</b>.<br> + Log in to the website to view comments on your submission.<br><br> Thank You ! <br><br>Regards,<br>NCCPS 2018,<br>FOSSEE - IIT Bombay. """.format( proposal.user.first_name, proposal.title, - 'http://dwsim.fossee.in/nccps-2018/abstract-details/' + - str(proposal.id), - ) - elif proposal.proposal_type == 'WORKSHOP': - subject = "NCCPS 2018 - Comment on Your Workshop Proposal" - message = """ - Dear {0}, <br><br> - There is a comment posted on your proposal for the workshop titled <b>{1}</b>.<br> - 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.<br><br> - Thank You ! <br><br>Regards,<br>NCCPS 2018,<br>FOSSEE - IIT Bombay. - """.format( - proposal.user.first_name, - proposal.title, - 'http://dwsim.fossee.in/nccps-2018/abstract-details/' + - str(proposal.id), ) email = EmailMultiAlternatives( subject, '', @@ -549,7 +532,7 @@ def status(request, proposal_id=None): user = request.user context = {} if user.is_authenticated: - if user.is_superuser: + if user.is_staff: proposal = Proposal.objects.get(id=proposal_id) if 'accept' in request.POST: proposal.status = "Accepted" @@ -581,18 +564,19 @@ def status(request, proposal_id=None): sender_email = TO_EMAIL to = (proposal.user.email, TO_EMAIL, ) if proposal.proposal_type == 'PAPER': - subject = "NCCPS 2018 - Talk Proposal Rejected" - message = """Dear """+proposal.user.first_name+""", - Thank you for your submission to the conference. Unfortunately, due to the large number of excellent talks that were submitted, your talk was not selected. We hope you are not discouraged and request you to kindly attend the conference and participate. We have an excellent line up of workshops (8 in total) and many excellent talks. You may also wish to give a lightning talk (a short 5 minute talk) at the conference if you so desire. - We look forward to your active participation in the conference. - \n\nThank You ! \n\nRegards,\nNCCPS 2018,\nFOSSEE - IIT Bombay""" - # message = """Dear """+proposal.user.first_name+""", - # Your talk was rejected because the contents of your work (your report for example) were entirely plagiarized. This is unacceptable and this amounts to severe academic malpractice and misconduct. As such we do not encourage this at any level whatsoever. We strongly suggest that you change your ways. You should NEVER EVER copy paste any content, no matter where you see it. Even if you cite the place where you lifted material from, it is not acceptable to copy anything verbatim. Always write in your own words. Your own personal integrity is much more important than a publication. When giving a tutorial it is understandable that you may use material that someone else has made if you acknowledge this correctly and with their full knowledge. However, the expectation is that you have done something yourself too. In your case a bulk of the work seems plagiarized and even if your talk material is your own, your act of plagiarizing content for your report is unacceptable to us. - - # Having said that, we do encourage you to attend the conference. We hope you do change your ways and be honest in the future. - - # \n\nRegards,\n\n - # NCCPS Program chairs""" + subject = "NCCPS 2018 - Paper Proposal Rejected" + message = """ + Dear {0}, <br><br> + We are thankful for your submission and patience. + We regret to inform you that your paper titled <b>“{1}”</b> is not selected for NCCPS-2018. + Please check the feedback of reviewers by logging in at {2}.<br> + You are welcome to attend the conference. Please register at {3} + <br>Thank You ! <br><br>Regards,<br>NCCPS 2018,<br>FOSSEE - IIT Bombay. + """.format( + proposal.user.first_name, + proposal.title, + 'https://dwsim.fossee.in/nccps-2018/accounts/login/' + 'https://dwsim.fossee.in/nccps-2018/#registration',) elif proposal.proposal_type == 'WORKSHOP': subject = "NCCPS 2018 - Workshop Proposal Rejected" @@ -652,9 +636,9 @@ def status(request, proposal_id=None): proposal.save() # context.update(csrf(request)) else: - return render(request, 'cfp.html') + return render(request, 'view-proposals.html') else: - return render(request, 'cfp.html') + return render(request, 'view-proposals.html') proposals = Proposal.objects.all().order_by('status') context['proposals'] = proposals context['user'] = user @@ -666,7 +650,7 @@ def status_change(request): user = request.user context = {} if user.is_authenticated: - if user.is_superuser: + if user.is_staff: if 'delete' in request.POST: delete_proposal = request.POST.getlist('delete_proposal') for proposal_id in delete_proposal: @@ -780,33 +764,27 @@ We strongly suggest that you try to plan your workshops carefully and focus on d sender_email = TO_EMAIL to = (proposal.user.email, TO_EMAIL) if proposal.proposal_type == 'PAPER': - subject = "NCCPS 2018 - Talk Proposal Rejected" - message = """Dear """+proposal.user.first_name+""", - Thank you for your submission to the conference. Unfortunately, due to the large number of excellent talks that were submitted, your talk was not selected. We hope you are not discouraged and request you to kindly attend the conference and participate. We have an excellent line up of workshops (8 in total) and many excellent talks. You may also wish to give a lightning talk (a short 5 minute talk) at the conference if you so desire. - We look forward to your active participation in the conference. - \n\nThank You ! \n\nRegards,\nNCCPS 2018,\nFOSSEE - IIT Bombay""" - # message = """Dear """+proposal.user.first_name+""", - # Your talk was rejected because the contents of your work (your report for example) were entirely plagiarized. This is unacceptable and this amounts to severe academic malpractice and misconduct. As such we do not encourage this at any level whatsoever. We strongly suggest that you change your ways. You should NEVER EVER copy paste any content, no matter where you see it. Even if you cite the place where you lifted material from, it is not acceptable to copy anything verbatim. Always write in your own words. Your own personal integrity is much more important than a publication. When giving a tutorial it is understandable that you may use material that someone else has made if you acknowledge this correctly and with their full knowledge. However, the expectation is that you have done something yourself too. In your case a bulk of the work seems plagiarized and even if your talk material is your own, your act of plagiarizing content for your report is unacceptable to us. - - # Having said that, we do encourage you to attend the conference. We hope you do change your ways and be honest in the future. - - # \n\nRegards,\n\nNCCPS Program chairs""" - elif proposal.proposal_type == 'WORKSHOP': - subject = "NCCPS 2018 - Workshop Proposal Rejected" - message = """Dear """+proposal.user.first_name+""", - Thank you for your submission to the conference. - Unfortunately, due to the large number of excellent workshops submitted, yours was not selected. We hope you are not discouraged and request you to kindly attend the conference and participate. We have an excellent line up of workshops (8 in total) and many excellent talks. You may also wish to give a lightning talk (a short 5 minute talk) at the conference if you so desire. - We look forward to your active participation in the conference. - \n\nThank You ! \n\nRegards,\nNCCPS 2018,\nFOSSEE - IIT Bombay""" - # message = """Dear """+proposal.user.first_name+""", - # Thank you for your excellent workshop submission titled “Digital forensics using Python”. The program committee was really excited about your proposal and thought it was a very good one. While the tools you use are certainly in the NCCPS toolstack the application was not entirely in the domain of the attendees we typically have at NCCPS. This along with the fact that we had many really good workshops that were submitted made it hard to select your proposal this time -- your proposal narrowly missed out. We strongly suggest that you submit this to other more generic Python conferences like the many PyCon and PyData conferences as it may be a much better fit there. We also encourage you to try again next year and if we have a larger audience, we may have space for it next year. This year with two tracks we already have 8 excellent workshops selected. - - # We really hope you are not discouraged as it was indeed a very good submission and a rather original one at that. We hope you understand and do consider participating in the conference anyway. + subject = "NCCPS 2018 - Paper proposal result" + message = """ + Dear {0}, <br><br> + We are thankful for your submission and patience. + We regret to inform you that your paper titled <b>“{1}”</b> is not selected for NCCPS-2018. + Please check the feedback of reviewers by logging in at {2}.<br> + You are welcome to attend the conference. Please register at {3} + <br>Thank You ! <br><br>Regards,<br>NCCPS 2018,<br>FOSSEE - IIT Bombay. + """.format( + proposal.user.first_name, + proposal.title, + 'https://dwsim.fossee.in/nccps-2018/accounts/login/', + 'https://dwsim.fossee.in/nccps-2018/#registration',) + 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) - # We look forward to seeing you at the conference and to your continued interest and participation. - # \n\nRegards,\n\nNCCPS Program chairs""" - #send_mail(subject, message, sender_email, to) - # context.update(csrf(request)) proposals = Proposal.objects.all() context['proposals'] = proposals context['user'] = user |