diff options
-rwxr-xr-x | scipy2016/settings.py | 8 | ||||
-rwxr-xr-x | scipy2016/urls.py | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | website/static/img/3.png | bin | 866048 -> 1374836 bytes | |||
-rwxr-xr-x | website/static/img/31.png | bin | 0 -> 866048 bytes | |||
-rwxr-xr-x | website/templates/base.html | 15 | ||||
-rwxr-xr-x | website/templates/cfp.html | 8 | ||||
-rw-r--r-- | website/templates/edit-proposal.html | 71 | ||||
-rwxr-xr-x | website/templates/submit-cfp.html | 3 | ||||
-rwxr-xr-x | website/templates/view-abstracts.html | 21 | ||||
-rwxr-xr-x | website/urls.py | 3 | ||||
-rwxr-xr-x | website/views.py | 91 |
11 files changed, 196 insertions, 25 deletions
diff --git a/scipy2016/settings.py b/scipy2016/settings.py index 7b43ace..721d775 100755 --- a/scipy2016/settings.py +++ b/scipy2016/settings.py @@ -108,13 +108,13 @@ DATABASES = { } } -LOCAL_SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = GOOGLE_KEY -LOCAL_SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = GOOGLE_SECRET +SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = GOOGLE_KEY +SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = GOOGLE_SECRET # API key AIzaSyDxRqGfJNJJIFw6traKTG5nC1mY8TNODu4 -LOCAL_SOCIAL_AUTH_FB_KEY = FACEBOOK_KEY -LOCAL_SOCIAL_AUTH_FB_SECRET = FACEBOOK_SECRET +SOCIAL_AUTH_FB_KEY = FACEBOOK_KEY +SOCIAL_AUTH_FB_SECRET = FACEBOOK_SECRET LOCAL_SOCIAL_AUTH_GITHUB_KEY = GITHUB_KEY diff --git a/scipy2016/urls.py b/scipy2016/urls.py index 86f5cf2..e1259cf 100755 --- a/scipy2016/urls.py +++ b/scipy2016/urls.py @@ -10,6 +10,7 @@ urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^', include('website.urls', namespace='website')), + url(r'^2016/', include('website.urls', namespace='website')), url(r'^', include('social.apps.django_app.urls', namespace='social')), url(r'^', include('django.contrib.auth.urls', namespace='auth')), diff --git a/website/static/img/3.png b/website/static/img/3.png Binary files differindex ea9be22..ac670e6 100755..100644 --- a/website/static/img/3.png +++ b/website/static/img/3.png diff --git a/website/static/img/31.png b/website/static/img/31.png Binary files differnew file mode 100755 index 0000000..ea9be22 --- /dev/null +++ b/website/static/img/31.png diff --git a/website/templates/base.html b/website/templates/base.html index a6b0988..4d1abfc 100755 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -24,8 +24,8 @@ <h1 >SciPy India 2016</h1>
<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;" >Attend</a></center>
- <a href="{% url 'website:cfp' %}" class="button special" style="width : 220px;">Call for Proposal</a></center>
+ <a href="#attend" class="button special" style="width : 220px;" >Register</a></center>
+ <a href="{% url 'website:cfp' %}" class="button special" style="width : 220px;">Submit Proposal</a></center>
</header>
{% endblock %}
@@ -42,8 +42,8 @@ <li> <a href="#header" class="smoothScroll">Home</a></li>
<li> <a href="#about" class="smoothScroll">About</a></li>
<li> <a href="#speakers" class="smoothScroll">Speakers</a></li>
- <li> <a href="#attend" class="smoothScroll">Attend</a></li>
- <li> <a href="{% url 'website:cfp' %}">Call for Proposal</a></li>
+ <li> <a href="#attend" class="smoothScroll">Register</a></li>
+ <li> <a href="{% url 'website:cfp' %}">Submit Proposal</a></li>
<li> <a href="#schedule" class="smoothScroll">Schedule</a></li>
<li> <a href="#venue" class="smoothScroll">Venue</a></li>
<li> <a href="#sponsors" class="smoothScroll">Sponsors</a></li>
@@ -52,7 +52,7 @@ <li><a href="{% url 'auth:logout' %}?next=/2016/cfp">Logout</a></li>
</ul>
{% else %}
- <li><a href="{% url 'website:cfp' %}" >Login</a></li>
+ <li><a href="{% url 'website:cfp' %}" >COC</a></li>
{% endif %}
</ul>
</div>
@@ -122,7 +122,7 @@ <section id="attend" class="main special">
<header class="major">
- <h2>ATTEND</h2>
+ <h2>REGISTER</h2>
</header>
<table >
@@ -276,8 +276,6 @@ <section>
<h2>Contact Us</h2>
<dl class="alt">
- <dt>Address</dt>
- <dd> CFD - Lab, Aero. Annex Building,<br> Below HSS Dept.,<br> Opp.Metallurgical Dept.IIT Bombay,<br> Powai, Mumbai - 400076<br>India</dd>
<dt>Phone</dt>
<dd> (+91) 22 25764133</dd>
<dt>Email</dt>
@@ -316,7 +314,6 @@ <script src="{% static 'js/ie/respond.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
<script src="{% static 'js/smoothscroll.js' %}"></script>
- <script src="{% static 'js/rating.js' %}"></script>
<script type="text/javascript">
diff --git a/website/templates/cfp.html b/website/templates/cfp.html index 1b9116b..a0437e4 100755 --- a/website/templates/cfp.html +++ b/website/templates/cfp.html @@ -4,7 +4,7 @@ <!DOCTYPE HTML> <html> <head> - <title>Call for Proposal</title> + <title>Submit Proposal</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" href="assets/css/main.css" /> @@ -15,7 +15,7 @@ {% block header %} <header id="header1"> <h1>SciPy India 2016</h1> - <h2>Call For Proposal</h2> + <h2>Submit Proposal</h2> </header> {% endblock %} @@ -32,7 +32,7 @@ <li><a href="{% url 'website:cfp' %}">{{ user.get_full_name|default:user.username }}</a> <li><a href="{% url 'auth:logout' %}?next=/2016/cfp">Logout</a></li> {% else %} - <li><a href="{% url 'website:cfp' %}" >Login</a></li> + <li><a href="{% url 'website:cfp' %}" >COC</a></li> {% endif %} </ul> </div> @@ -79,7 +79,7 @@ {% else %} <ul class="features"> <li> - <span><h2><u>Login</u></h2></span> + <span><h2><u>Code of Conduct</u></h2></span> <p>Login/Register to Submit a Proposal</p> {% if invalid %} diff --git a/website/templates/edit-proposal.html b/website/templates/edit-proposal.html new file mode 100644 index 0000000..3201291 --- /dev/null +++ b/website/templates/edit-proposal.html @@ -0,0 +1,71 @@ +{% extends 'base.html' %} +{% load static %} + +<!DOCTYPE HTML> + +<html> + <head> + <title>{{ user.get_full_name|default:user.username }}</title> + </head> + <body> + + + + {% block header %} + <header id="header1"> + <h1>Scipy India 2016</h1> + {% if proposal.proposal_type == "ABSTRACT"%} + <h2>Edit Abstract Proposal</h2> + {% else %} + <h2>Edit Workshop Proposal</h2> + {% endif %} +</header> +{% endblock %} + +{% block nav %} + +<div id="navbar-main"> + <div class="navbar navbar-inverse navbar-fixed-top"> + <div class="navbar-collapse collapse"> + <ul class="nav navbar-nav"> + <li><a href="{% url 'website:home' %}" class="active">Home</a></li> + {% if user and not user.is_anonymous %} + <li><a href="{% url 'website:cfp' %}">{{ user.get_full_name|default:user.username }}</a> + <li><a href="{% url 'auth:logout' %}?next=/2016/cfp">Logout</a></li> + {% else %} + <li><a href="{% url 'website:cfp' %}" >Login</a></li> + {% endif %} + </ul> + </div> + </div> +</div> +{% endblock %} + +{% block content %} + + <div id="wrapper"> + <div id="main"> + <section id="content" class="main"> + <h3>{{ proposal.user.first_name }} {{ proposal.user.last_name }}</h3> + <form action="" method=POST enctype="multipart/form-data"> {% csrf_token %} + <div class="row1"> + {% for field in form %} + + <p>{{ field.label}} + {% if field.field.required %} <span style="color:red;">*</span> {% endif %} + {{ field }}</p> + <a style="color:red; ">{{ field.errors }}</a> + {% endfor %} + </div> + {% csrf_token %} + + <center><button class="button special" style="background:#D44727" type="submit">Submit</button></center> + </form> + + + </section> + </div> + </div> + + +{% endblock %}
\ No newline at end of file diff --git a/website/templates/submit-cfp.html b/website/templates/submit-cfp.html index 4611a5d..426bfa1 100755 --- a/website/templates/submit-cfp.html +++ b/website/templates/submit-cfp.html @@ -86,8 +86,9 @@ {% endfor %} </div> {% csrf_token %} + <center><button class="button special" style="background:#D44727" type="submit">Submit</button></center> - + </form> </section> </div> {% endif %} diff --git a/website/templates/view-abstracts.html b/website/templates/view-abstracts.html index 12cf45e..b5804f1 100755 --- a/website/templates/view-abstracts.html +++ b/website/templates/view-abstracts.html @@ -53,8 +53,11 @@ You have not submitted any proposal. To submit proposal click <a href="{% url 'website:cfp' %}">here </a></center> {% else %} - <form action="{% url 'website:delete' %}" method="post" onsubmit="return confirm('Sure?');"> {% csrf_token %} - <table class="table"> + + <form action="{% url 'website:status_change' %}" method="post" onsubmit="return confirm('Sure?');"> {% csrf_token %} + + + <table id = "myTable" class="tablesorter"> <colgroup> {% if user.is_superuser %} <col width="10%" /> @@ -114,8 +117,12 @@ You have not submitted any proposal. To submit proposal click <a href="{% url 'w {% elif proposal.status = 'Commented' %} <h5 style="color:brown;">{{proposal.status}}</h5> {% elif proposal.status = 'Resubmit' %} - <h5 style="color:grey;">{{proposal.status}}</h5> - {% else %} + {% if user.is_superuser %} + <h5 style="color:grey;">{{proposal.status}}</h5> + {% else %} + <a href="{% url 'website:edit_proposal' proposal.id %}">{{proposal.status}}</a> + {% endif %} + {% else %} <h5 style="color:blue;">{{proposal.status}}</h5> {% endif %} @@ -125,7 +132,11 @@ You have not submitted any proposal. To submit proposal click <a href="{% url 'w </table> {% if user.is_superuser %} <center><input type="submit" id="delete" class ="button special" style="background:#D44727;" value="Delete" name="delete"/> - <input type="submit" id="dump" class ="button special" style="background:#D44727;" value="Dump" name="dump"/></center> + <input type="submit" id="dump" class ="button special" style="background:#D44727;" value="Dump" name="dump"/></center><br> + <center> + <input type="submit" id="accept" class ="button special" style="background:green;" value="Accept" name="accept"/> + <input type="submit" id="rejected" class ="button special" style="background:red;" value="Reject" name="reject"/> + <input type="submit" id="resubmit" class ="button special" style="background:grey;" value="Resubmit" name="resubmit"/></center> {% endif %} </form> diff --git a/website/urls.py b/website/urls.py index 6bcaf3c..1db938f 100755 --- a/website/urls.py +++ b/website/urls.py @@ -14,7 +14,8 @@ urlpatterns = patterns('', # url(r'^view-abstracts/$', 'website.views.view_abstracts', name='view_abstracts'), url(r'^view-abstracts/$', 'website.views.view_abstracts', name='view_abstracts'), url(r'^abstract-details/(?P<proposal_id>\d+)$', 'website.views.abstract_details', name='abstract_details'), - url(r'^view-abstracts/delete/$', 'website.views.delete', name='delete'), + url(r'^edit-proposal/(?P<proposal_id>\d+)$', 'website.views.edit_proposal', name='edit_proposal'), + url(r'^view-abstracts/status/$', 'website.views.status_change', name='status_change'), url(r'^comment-abstract/(?P<proposal_id>\d+)$', 'website.views.comment_abstract', name='comment_abstract'), url(r'^comment-abstract/status/(?P<proposal_id>\d+)$', 'website.views.status', name='status'), url(r'^comment-abstract/rate/(?P<proposal_id>\d+)$', 'website.views.rate_proposal', name='rate_proposal'), diff --git a/website/views.py b/website/views.py index 5e5dbd1..2ae7684 100755 --- a/website/views.py +++ b/website/views.py @@ -260,6 +260,32 @@ def view_abstracts(request): return render(request, 'cfp.html') +def edit_proposal(request, proposal_id = None): + user = request.user + context = {} + if user.is_authenticated(): + proposal = Proposal.objects.get(id=proposal_id) + if proposal.proposal_type == 'ABSTRACT': + form = ProposalForm(request.POST, request.FILES, instance=proposal) + else: + form = WorkshopForm(request.POST, request.FILES, instance=proposal) + if request.method == 'POST': + if form.is_valid(): + data = form.save(commit = False) + data.user = user + proposal.status = 'Resubmitted' + data.save() + context.update(csrf(request)) + return render(request, 'cfp.html') + else: + context['user'] = user + return render(request, 'cfp.html', context) + context['user'] = user + context['form'] = form + context['proposal'] = proposal + return render(request, 'edit-proposal.html', context) + + def abstract_details(request, proposal_id=None): user = request.user context = {} @@ -455,7 +481,7 @@ def status(request, proposal_id= None): -def delete(request): +def status_change(request): user = request.user context = {} if user.is_authenticated(): @@ -513,6 +539,69 @@ def delete(request): context['proposals'] = proposals context['user'] = user return render(request, 'view-abstracts.html', context) + elif 'accept' in request.POST: + delete_proposal = request.POST.getlist('delete_proposal') + for proposal_id in delete_proposal: + proposal = Proposal.objects.get(id = proposal_id) + proposal.status = "Accepted" + proposal.save() + sender_name = "SciPy India 2016" + sender_email = "scipy@fossee.in" + to = (proposal.user.email, ) + 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. + 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. + 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)) + proposals = Proposal.objects.all() + context['proposals'] = proposals + context['user'] = user + return render(request, 'view-abstracts.html', context) + elif 'reject' in request.POST: + delete_proposal = request.POST.getlist('delete_proposal') + for proposal_id in delete_proposal: + proposal = Proposal.objects.get(id = proposal_id) + proposal.status="Rejected" + proposal.save() + sender_name = "SciPy India 2016" + sender_email = "scipy@fossee.in" + to = (proposal.user.email, ) + 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+ """'as not been shortlisted.<br> + You may register and attend the conference by clicking <a herf=""http://scipyindia2016.doattend.com/> here</a> + \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+ """'as not been shortlisted.<br> + You may register and attend the conference by clicking <a herf=""http://scipyindia2016.doattend.com/> here</a> + \n\n Thank You ! \n\nRegards,\nSciPy India 2016,\nFOSSEE - IIT Bombay""" + send_mail(subject, message, sender_email, to) + context.update(csrf(request)) + proposals = Proposal.objects.all() + context['proposals'] = proposals + context['user'] = user + return render(request, 'view-abstracts.html', context) + elif 'resubmit' in request.POST: + delete_proposal = request.POST.getlist('delete_proposal') + for proposal_id in delete_proposal: + proposal = Proposal.objects.get(id = proposal_id) + proposal.status="Resubmit" + proposal.save() + context.update(csrf(request)) + proposals = Proposal.objects.all() + context['proposals'] = proposals + context['user'] = user + return render(request, 'view-abstracts.html', context) else: proposals = Proposal.objects.all() context['proposals'] = proposals |