summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscipy2017/settings.py14
-rwxr-xr-xwebsite/templates/cfp.html45
-rwxr-xr-xwebsite/templates/edit-proposal.html2
-rwxr-xr-xwebsite/templates/submit-cfp.html4
-rwxr-xr-xwebsite/templates/submit-cfw.html3
-rwxr-xr-xwebsite/templates/view-abstracts.html20
-rwxr-xr-xwebsite/views.py54
7 files changed, 99 insertions, 43 deletions
diff --git a/scipy2017/settings.py b/scipy2017/settings.py
index 447492f..748ab53 100755
--- a/scipy2017/settings.py
+++ b/scipy2017/settings.py
@@ -163,3 +163,17 @@ LOGIN_REDIRECT_URL = '/2017/cfp'
ADMINS = SYSADMINS
SERVER_EMAIL = SYS_SERVER_EMAIL
+
+
+EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
+# Host for sending e-mail.
+EMAIL_HOST = EMAIL_HOST_SERVER
+
+# Port for sending e-mail.
+EMAIL_PORT = EMAIL_PORT_SERVER
+
+# Optional SMTP authentication information for EMAIL_HOST.
+EMAIL_HOST_USER = EMAIL_HOST_USER_SERVER
+EMAIL_HOST_PASSWORD = EMAIL_HOST_PASSWORD_SERVER
+EMAIL_USE_TLS = EMAIL_USE_TLS_SERVER
+
diff --git a/website/templates/cfp.html b/website/templates/cfp.html
index 4776ce0..b8e28f2 100755
--- a/website/templates/cfp.html
+++ b/website/templates/cfp.html
@@ -65,16 +65,56 @@
</ul>
<br/>
{% if user.is_superuser %}
- <center><a href="{% url 'website:view_abstracts' %}" class="button special">View Proposals</a> </center>
+ <center><a href="{% url 'website:view_abstracts' %}" class="btn btn-info">View Proposals</a> </center>
{% else %}
<center>
- <a href="{% url 'website:view_abstracts' %}" class="button special">View Proposals</a>
+ <a href="{% url 'website:view_abstracts' %}" class="btn btn-info">View Proposals</a>
+ <a href="{% url 'website:submitcfp' %}" class ="btn btn-info" role="button"> Submit paper </a>
+ <a href="{% url 'website:submitcfw' %}" class ="btn btn-info" role="button">Submit workshop </a>
</center>
{% endif %}
{% else %}
<p align = "justify">We invite you to submit proposals for talks or workshops to be presented at SciPy 2017. The time duration for talks is 15 or 30 minutes and for workshops is 2 to 4 hours. There will be two parallel tracks for the workshops this year. One track is meant for beginners and the other is for advanced users.
</p>
<hr>
+<<<<<<< HEAD
+ <span>
+ <h2><u>Login</u></h2>
+ </span>
+ <p>Login/Register to Submit a Proposal</p>
+ {% if invalid %}
+ <p style="color:red; font-size:15px;">* Invalid Username/Password</p>
+ {% endif %}
+ <!-- <div id = "my_form"> -->
+ <form action="" method="POST">
+ {{ form.as_p }}
+ <button class="btn btn-info" name ="login" type="submit">Login</button><br/><br/>
+ <a style="padding-right : 20px;" href="{% url 'website:userregister' %}" class="btn btn btn-primary">Create an Account</a>
+ <a href="/2017/forgotpassword/">Forgot Password?</a>
+ {% csrf_token %}
+ </form>
+ <!-- </div> -->
+ <p>Or Sign in with:&nbsp;
+ <a href="{% url 'social:begin' 'google-oauth2' %}" class="btn btn-social-icon " style="color:#dd4b39;"><i class="icon-google-plus"></i></a>&nbsp;
+ <a href="{% url 'social:begin' 'facebook' %}?next={{ request.path }}" class=" btn btn-social-icon" style="color:#3b5998"><i class="icon-facebook"></i></a>
+ </p>
+ </li>
+ <!-- </div> -->
+ <!-- <div class="col-md-6" > -->
+ <li>
+ <span>
+ <h2><u>Important Dates</u></h2>
+ </span>
+ <ul>
+ <li>Call for proposals opens: <b>15 Sept. 2017</b></li>
+ <li>Last date for submission of proposals: <b>1st Nov. 2017</b></li>
+ <li>Announcement of selected proposals: <b>15 Nov. 2017</b></li>
+ </ul>
+ </li>
+ <!-- </div> -->
+ {% endif %}
+ </div>
+=======
<div class="row">
<div style="float:right;padding-left: 30px;">
<span><h2><u>Login</u></h2></span>
@@ -108,6 +148,7 @@
</div>
{% endif %}
</div>
+>>>>>>> 5c624c6831481d0701d673e46ae15fcfcef4152f
{% endblock %}
{% include 'footer.html' %}
</body>
diff --git a/website/templates/edit-proposal.html b/website/templates/edit-proposal.html
index da5aad6..fa8aac5 100755
--- a/website/templates/edit-proposal.html
+++ b/website/templates/edit-proposal.html
@@ -22,7 +22,7 @@
<div class="container">
<p>
<center>
- {% if proposal.proposal_type == "ABSTRACT"%}
+ {% if proposal.proposal_type == "ABSTRACT" %}
<h2>Edit Abstract Proposal</h2>
{% else %}
<h2>Edit Workshop Proposal</h2>
diff --git a/website/templates/submit-cfp.html b/website/templates/submit-cfp.html
index 1a7b42d..d4486fe 100755
--- a/website/templates/submit-cfp.html
+++ b/website/templates/submit-cfp.html
@@ -20,7 +20,7 @@
{% block content %}
<div class="container">
{% if proposals_a > 1 %} You have exceeded the abstract submission limit.
- You may view your submitted proposals by clicking <a href="{% url 'website:view_abstracts' %}" class="btn "> here</a>
+ You may view your submitted proposals by clicking <a href="{% url 'website:view_abstracts' %}" class ="btn btn-info" role="button"> here</a>
<!-- <h2>{{ user.get_full_name|default:user.username }} </h2> -->
{% else %} <br>
@@ -49,7 +49,7 @@
{% endfor %}
</div>
{% csrf_token %}
- <center><button class="button special" type="submit">Submit</button></center>
+ <center><button class="btn btn-info" type="submit">Submit</button></center>
</form>
{% endif %}
</div>
diff --git a/website/templates/submit-cfw.html b/website/templates/submit-cfw.html
index e6d1fd0..0122ad5 100755
--- a/website/templates/submit-cfw.html
+++ b/website/templates/submit-cfw.html
@@ -28,6 +28,7 @@
<hr>
{% if proposals_w > 1 %} You have exceeded the workshop proposal submission limit.
You may view your submitted proposals by clicking <a href="{% url 'website:view_abstracts' %}" class="btn "> here</a>
+ {% else %}
<!-- <h2>{{ user.get_full_name|default:user.username }} </h2> -->
<!-- <h2>{{ user.get_full_name|default:user.username }} </h2> -->
<h2><u>Proposal Guidelines</u></h2>
@@ -65,7 +66,7 @@
{% if form.error %}
Auch
{% endif %}
- <center><button class="button special" style="background:#D44727" type="submit">Submit</button></center>
+ <center><button class="btn btn-info" type="submit">Submit</button></center>
{% endif %}
</div>
{% endblock %}
diff --git a/website/templates/view-abstracts.html b/website/templates/view-abstracts.html
index 0b62565..bcdf74f 100755
--- a/website/templates/view-abstracts.html
+++ b/website/templates/view-abstracts.html
@@ -27,11 +27,13 @@
</p>
{% if not proposals %}
<center>
- You have not submitted any proposal. To submit proposal click <a href="{% url 'website:submitcfp' %}">here </a>
+ You have not submitted any proposal.<br> <br>
+ <a href="{% url 'website:submitcfp' %}" class ="btn btn-info" role="button"> Submit paper </a>
+ <a href="{% url 'website:submitcfw' %}" class ="btn btn-info" role="button">Submit workshop </a>
</center>
{% else %}
{% if user.is_superuser %}
- <div style="float:right"><input type="submit" id="dump" class ="button special" value="Export as csv" name="dump"/></div>
+ <div style="float:right"><input type="submit" id="dump" class ="btn btn-info" value="Export as csv" name="dump"/></div>
<br>
{% endif %}
<form action="{% url 'website:status_change' %}" method="post" onsubmit="return confirm('Are You Sure?');">
@@ -55,10 +57,8 @@
<col width="20%" />
{% endif %}
</colgroup>
- {% if user.is_superuser %}
+ {% if user.is_superuser %}
<th style="text-align: center;">
- <center><input type="checkbox" onClick="toggle(this)" />
- </center>
</th>
<th style="text-align: center;">Speaker
{% endif %}
@@ -115,7 +115,7 @@
{% if user.is_superuser %}
<h5 style="color:grey;">{{proposal.status}}</h5>
{% else %}
- <a href="{% url 'website:edit_proposal' proposal.id %}">{{proposal.status}}</a>
+ <a href="{% url 'website:edit_proposal' proposal.id %}">{{proposal.status}}</a>
{% endif %}
{% else %}
<h5 style="color:blue;">{{proposal.status}}</h5>
@@ -127,11 +127,11 @@
</div>
</p>
{% if user.is_superuser %}
- <input type="submit" id="delete" class ="button special" value="Delete" name="delete"/>
+ <input type="submit" id="delete" class ="btn btn-info" value="Delete" name="delete"/>
<center>
- <input type="submit" id="accept" class ="button special" value="Accept" name="accept"/>
- <input type="submit" id="rejected" class ="button special" value="Reject" name="reject"/>
- <input type="submit" id="resubmit" class ="button special" value="Resubmit" name="resubmit"/>
+ <input type="submit" id="accept" class ="btn btn-info" value="Accept" name="accept"/>
+ <input type="submit" id="rejected" class ="btn btn-info" value="Reject" name="reject"/>
+ <input type="submit" id="resubmit" class ="btn btn-info" value="Resubmit" name="resubmit"/>
</center>
{% endif %}
</form>
diff --git a/website/views.py b/website/views.py
index bd96143..f2d53f7 100755
--- a/website/views.py
+++ b/website/views.py
@@ -17,7 +17,7 @@ from django.db.models import F
import csv
from django.core.mail import EmailMultiAlternatives
import os
-from scipy2017.local import SENDER_EMAIL
+from scipy2017.local import *
from website.forms import ProposalForm, UserRegisterForm, UserLoginForm, WorkshopForm, ContactForm
from website.models import Proposal, Comments, Ratings
@@ -99,7 +99,7 @@ def home(request):
if request.method == "POST":
sender_name = request.POST['name']
sender_email = request.POST['email']
- to = ('scipy@fossee.in', sender_email)
+ to = (TO_EMAIL, sender_email)
subject = "Query from - "+sender_name
message = request.POST['message']
try:
@@ -158,9 +158,9 @@ def submitcfp(request):
data.save()
context['proposal_submit'] = True
sender_name = "SciPy India 2017"
- sender_email = SENDER_EMAIL
+ sender_email = TO_EMAIL
subject = "SciPy India 2017 – Talk Proposal Submission Acknowledgment"
- to = (social_user.email, SENDER_EMAIL)
+ to = (social_user.email, TO_EMAIL)
message = """
Dear {0}, <br><br>
Thank you for showing interest & submitting a talk proposal at SciPy India 2017 conference for the talk titled <b>“{1}”</b>. Reviewal of the proposals will start once the CFP closes.
@@ -177,7 +177,7 @@ def submitcfp(request):
headers={"Content-type":"text/html;charset=iso-8859-1"}
)
email.attach_alternative(message, "text/html")
- #email.send(fail_silently=True)
+ email.send(fail_silently=True)
return render_to_response('cfp.html', context)
else:
context['proposal_form'] = form
@@ -211,9 +211,9 @@ def submitcfw(request):
data.save()
context['proposal_submit'] = True
sender_name = "SciPy India 2017"
- sender_email = SENDER_EMAIL
+ sender_email = TO_EMAIL
subject = "SciPy India 2017 – Workshop Proposal Submission Acknowledgment"
- to = (social_user.email, SENDER_EMAIL)
+ to = (social_user.email, TO_EMAIL)
message = """
Dear {0}, <br><br>
Thank you for showing interest & submitting a workshop proposal at SciPy India 2017 conference for the workshop titled <b>“{1}”</b>. Reviewal of the proposals will start once the CFP closes.
@@ -230,7 +230,7 @@ def submitcfw(request):
headers={"Content-type":"text/html;charset=iso-8859-1"}
)
email.attach_alternative(message, "text/html")
- #email.send(fail_silently=True)
+ email.send(fail_silently=True)
return render_to_response('cfp.html', context)
else:
context['proposal_form'] = form
@@ -410,8 +410,8 @@ def comment_abstract(request, proposal_id = None):
comment.save()
comments = Comments.objects.filter(proposal=proposal)
sender_name = "SciPy India 2017"
- sender_email = SENDER_EMAIL
- to = (proposal.user.email, SENDER_EMAIL )
+ sender_email = TO_EMAIL
+ to = (proposal.user.email, TO_EMAIL )
if proposal.proposal_type == 'ABSTRACT':
subject = "SciPy India 2017 - Comment on Your talk Proposal"
message = """
@@ -444,7 +444,7 @@ def comment_abstract(request, proposal_id = None):
headers={"Content-type":"text/html;charset=iso-8859-1"}
)
email.attach_alternative(message, "text/html")
- #email.send(fail_silently=True)
+ email.send(fail_silently=True)
proposal.status="Commented"
proposal.save()
rates = Ratings.objects.filter(proposal=proposal)
@@ -484,8 +484,8 @@ def status(request, proposal_id= None):
proposal.status="Accepted"
proposal.save()
sender_name = "SciPy India 2017"
- sender_email = SENDER_EMAIL
- to = (proposal.user.email, SENDER_EMAIL)
+ sender_email = TO_EMAIL
+ to = (proposal.user.email, TO_EMAIL)
if proposal.proposal_type == 'ABSTRACT':
subject = "SciPy India 2017 - Talk Proposal Accepted"
message = """Dear """+proposal.user.first_name+""",
@@ -502,8 +502,8 @@ def status(request, proposal_id= None):
proposal.status="Rejected"
proposal.save()
sender_name = "SciPy India 2017"
- sender_email = SENDER_EMAIL
- to = (proposal.user.email,SENDER_EMAIL, )
+ sender_email = TO_EMAIL
+ to = (proposal.user.email,TO_EMAIL, )
if proposal.proposal_type == 'ABSTRACT':
subject = "SciPy India 2017 - Talk Proposal Rejected"
message = """Dear """+proposal.user.first_name+""",
@@ -519,9 +519,9 @@ def status(request, proposal_id= None):
send_mail(subject, message, sender_email, to)
context.update(csrf(request))
elif 'resubmit' in request.POST:
- to = (proposal.user.email, SENDER_EMAIL )
+ to = (proposal.user.email, TO_EMAIL )
sender_name = "SciPy India 2017"
- sender_email = SENDER_EMAIL
+ sender_email = TO_EMAIL
if proposal.proposal_type == 'ABSTRACT':
subject = "SciPy India 2017 - Talk Proposal Resumbmission"
message = """
@@ -553,7 +553,7 @@ def status(request, proposal_id= None):
headers={"Content-type":"text/html;charset=iso-8859-1"}
)
email.attach_alternative(message, "text/html")
- #email.send(fail_silently=True)
+ email.send(fail_silently=True)
proposal.status="Edit"
proposal.save()
context.update(csrf(request))
@@ -647,8 +647,8 @@ def status_change(request):
proposal.status = "Accepted"
proposal.save()
sender_name = "SciPy India 2017"
- sender_email = SENDER_EMAIL
- to = (proposal.user.email, SENDER_EMAIL)
+ sender_email = TO_EMAIL
+ to = (proposal.user.email, TO_EMAIL)
if proposal.proposal_type == 'ABSTRACT':
subject = "SciPy India 2017 - Talk Proposal Accepted"
message = """Dear """+proposal.user.first_name+""",
@@ -659,7 +659,7 @@ def status_change(request):
message = """Dear """+proposal.user.first_name+""",
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 2017,\nFOSSEE - IIT Bombay"""
- #send_mail(subject, message, sender_email, to)
+ send_mail(subject, message, sender_email, to)
context.update(csrf(request))
proposals = Proposal.objects.all()
context['proposals'] = proposals
@@ -672,8 +672,8 @@ def status_change(request):
proposal.status="Rejected"
proposal.save()
sender_name = "SciPy India 2017"
- sender_email = SENDER_EMAIL
- to = (proposal.user.email, SENDER_EMAIL)
+ sender_email = TO_EMAIL
+ to = (proposal.user.email, TO_EMAIL)
if proposal.proposal_type == 'ABSTRACT':
subject = "SciPy India 2017 - Talk Proposal Rejected"
message = """Dear """+proposal.user.first_name+""",
@@ -686,7 +686,7 @@ def status_change(request):
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://scipyindia2017.doattend.com/
\n\nThank You ! \n\nRegards,\nSciPy India 2017,\nFOSSEE - IIT Bombay"""
- #send_mail(subject, message, sender_email, to)
+ send_mail(subject, message, sender_email, to)
context.update(csrf(request))
proposals = Proposal.objects.all()
context['proposals'] = proposals
@@ -697,8 +697,8 @@ def status_change(request):
for proposal_id in delete_proposal:
proposal = Proposal.objects.get(id = proposal_id)
sender_name = "SciPy India 2017"
- sender_email = SENDER_EMAIL
- to = (proposal.user.email, SENDER_EMAIL )
+ sender_email = TO_EMAIL
+ to = (proposal.user.email, TO_EMAIL )
if proposal.proposal_type == 'ABSTRACT':
subject = "SciPy India 2017 - Talk Proposal Resumbmission"
message = """
@@ -730,7 +730,7 @@ def status_change(request):
headers={"Content-type":"text/html;charset=iso-8859-1"}
)
email.attach_alternative(message, "text/html")
- #email.send(fail_silently=True)
+ email.send(fail_silently=True)
proposal.status="Edit"
proposal.save()
context.update(csrf(request))