summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nccps2018/urls.py27
-rw-r--r--static/website/bootstrap-css/assets/css/main.css19
-rw-r--r--static/website/bootstrap-css/assets/images/favicon.pngbin0 -> 2519 bytes
-rwxr-xr-xstatic/website/bootstrap-css/custom.css3
-rw-r--r--static/website/bootstrap-css/images/loader-64x/Preloader_2.gif.gifbin0 -> 723 bytes
-rwxr-xr-xstatic/website/templates/abstract-details.html44
-rwxr-xr-xstatic/website/templates/cfp.html56
-rwxr-xr-xstatic/website/templates/comment-abstract.html98
-rwxr-xr-xstatic/website/templates/edit-proposal.html35
-rw-r--r--static/website/templates/header.html3
-rw-r--r--static/website/templates/home.html508
-rw-r--r--static/website/templates/navbar.html17
-rwxr-xr-xstatic/website/templates/registration/password_change_done.html47
-rwxr-xr-xstatic/website/templates/registration/password_change_form.html49
-rwxr-xr-xstatic/website/templates/registration/password_reset_complete.html41
-rwxr-xr-xstatic/website/templates/registration/password_reset_confirm.html91
-rwxr-xr-xstatic/website/templates/registration/password_reset_done.html41
-rwxr-xr-xstatic/website/templates/registration/password_reset_form.html26
-rwxr-xr-xstatic/website/templates/submit-cfw.html102
-rwxr-xr-xstatic/website/templates/user-register.html43
-rwxr-xr-xwebsite/forms.py205
-rw-r--r--website/migrations/0002_proposal_open_to_share.py18
-rw-r--r--website/models.py31
-rw-r--r--website/urls.py43
-rw-r--r--website/views.py809
25 files changed, 1969 insertions, 387 deletions
diff --git a/nccps2018/urls.py b/nccps2018/urls.py
index b48e7c3..21733fd 100644
--- a/nccps2018/urls.py
+++ b/nccps2018/urls.py
@@ -1,4 +1,4 @@
-"""nccps2018 URL Configuration
+"""Scipy2018 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
@@ -14,9 +14,28 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
-from django.urls import include, path
+from django.urls import include, path, re_path
+from django.contrib.auth import views as auth_views
+
urlpatterns = [
- path('', include('website.urls')),
+ re_path(r'^', include('website.urls', namespace='website')),
+ re_path(r'^accounts/',
+ include(('django.contrib.auth.urls', 'auth'), namespace='auth')),
path('admin/', admin.site.urls),
-]
+
+ re_path(r'^', include('social.apps.django_app.urls', namespace='social')),
+
+ re_path(r'^forgotpassword/$', auth_views.PasswordResetView.as_view(
+ template_name='registration/password_reset_form.html'), name="password_reset"),
+ re_path(r'^password_reset/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$', auth_views.PasswordResetConfirmView.as_view(
+ template_name='registration/password_reset_confirm.html'), name='password_reset_confirm'),
+ re_path(r'^password_reset/mail_sent/$', auth_views.PasswordResetDoneView.as_view(template_name='registration/password_reset_done.html'),
+ name='password_reset_done'),
+ re_path(r'^password_reset/complete/$', auth_views.PasswordResetCompleteView.as_view(template_name='registration/password_reset_complete.html'),
+ name='password_reset_complete'),
+ re_path(r'^changepassword/$', auth_views.PasswordChangeView.as_view(template_name='registration/password_change_form.html'),
+ name='password_change'),
+ re_path(r'^password_change/done/$', auth_views.PasswordChangeDoneView.as_view(template_name='registration/password_change_done.html'),
+ name='password_change_done'),
+] \ No newline at end of file
diff --git a/static/website/bootstrap-css/assets/css/main.css b/static/website/bootstrap-css/assets/css/main.css
index 57ac778..1efd34d 100644
--- a/static/website/bootstrap-css/assets/css/main.css
+++ b/static/website/bootstrap-css/assets/css/main.css
@@ -41,7 +41,7 @@ p {
}
ul li {
- font-weight: 700;
+ font-weight: 500;
margin-bottom: 10px;
}
@@ -457,13 +457,15 @@ ul li {
/*
* 6.6 Section: Schedule
*/
-.schedule-box {
- position: relative;
- background-color: #000;
+ .schedule-box {
+ /*background-color: #000;*/
+ color: black;
+ font-weight: 500;
+}
+.schedule-box .schedule-header{
color: #fff;
- text-align: center;
- padding: 50px 0;
- margin: 25px 0 0;
+ background-color: #806600;
+ font-weight: 600;
}
.schedule-box::before {
content: '';
@@ -472,9 +474,8 @@ ul li {
right: 5px;
bottom: 5px;
left: 5px;
- border: 1px solid #fff;
+ /*border: 1px solid #fff;*/
}
-
/*
* 6.7 Section: Schedule
*/
diff --git a/static/website/bootstrap-css/assets/images/favicon.png b/static/website/bootstrap-css/assets/images/favicon.png
new file mode 100644
index 0000000..193caff
--- /dev/null
+++ b/static/website/bootstrap-css/assets/images/favicon.png
Binary files differ
diff --git a/static/website/bootstrap-css/custom.css b/static/website/bootstrap-css/custom.css
index 7014560..4533ab7 100755
--- a/static/website/bootstrap-css/custom.css
+++ b/static/website/bootstrap-css/custom.css
@@ -1,6 +1,7 @@
/* Paste this css to your style sheet file or under head tag */
/* This only works with JavaScript,
if it's not present, don't show loader */
+{% load static %}
.no-js #loader { display: none; }
.js #loader { display: block; position: absolute; left: 100px; top: 0; }
.se-pre-con {
@@ -10,7 +11,7 @@ if it's not present, don't show loader */
width: 100%;
height: 100%;
z-index: 9999;
- background: url(images/loader-64x/Preloader_2.gif) center no-repeat #fff;
+ background: url({% static 'website/bootstrap-css/images/loader-64x/Preloader_2.gif' %}) center no-repeat #fff;
}
.btn:focus, .btn:active, button:focus, button:active {
diff --git a/static/website/bootstrap-css/images/loader-64x/Preloader_2.gif.gif b/static/website/bootstrap-css/images/loader-64x/Preloader_2.gif.gif
new file mode 100644
index 0000000..8b71ca9
--- /dev/null
+++ b/static/website/bootstrap-css/images/loader-64x/Preloader_2.gif.gif
Binary files differ
diff --git a/static/website/templates/abstract-details.html b/static/website/templates/abstract-details.html
new file mode 100755
index 0000000..07dcfc3
--- /dev/null
+++ b/static/website/templates/abstract-details.html
@@ -0,0 +1,44 @@
+{% extends "base.html" %}
+{% load static %}
+ {% block content %}
+ <section id="abstract_details" class="section abstract_details">
+ <div class="container">
+ <p>
+ <center>
+ <h2>Abstract Details</h2>
+ </center>
+ </p>
+ <h3><span class="label label-primary">{{ proposal.user.first_name }} {{ proposal.user.last_name }}</span></h3>
+ <hr>
+ <p><b>Title: </b>&nbsp;{{ proposal.title }}</p>
+ <p><b>About Me: </b>&nbsp;{{ proposal.about_me | linebreaks }}</p>
+ <p><b>Abstract: </b>&nbsp;{{ proposal.abstract |linebreaks }}</p>
+ {% if proposal.prerequisite %}
+ <p><b>Prerequisite: </b>&nbsp;{{ proposal.prerequisite |linebreaks }}</p>
+ {% endif%}
+ <p><b>Duration: </b>&nbsp;{{ proposal.duration }} {% if proposal.proposal_type == "ABSTRACT"%} Mins {% else %}Hours {%endif%}</p>
+ {% if proposal.proposal_type == "ABSTRACT"%}
+ <p><b>Tags: </b>&nbsp;{{ proposal.tags }}</p>
+ {% else %}
+ <p><b>Level: </b>&nbsp;{{ proposal.tags }}</p>
+ {% endif %}
+ <p><b>Date Created: </b>&nbsp;{{ proposal.date_created }}</p>
+ {% if url %}
+ <p><b>Attachment: </b>&nbsp;
+ <a href="{{ url }}" class="btn btn-info" target="_blank">{{filename}}</a>
+ </p>
+ {% endif %}
+ <p><b>Comments: </b>
+ <hr>
+ {% for comment in comments %}
+ <div>
+ <strong>Comment By:</strong>
+ {{ comment.user.first_name }} {{ comment.user.last_name }}
+ <p>{{ comment.comment| linebreaks }}</p>
+ </div>
+ <hr>
+ {% endfor %}
+ </div>
+ </section>
+ {% endblock %}
+
diff --git a/static/website/templates/cfp.html b/static/website/templates/cfp.html
index 704fafb..f8160ac 100755
--- a/static/website/templates/cfp.html
+++ b/static/website/templates/cfp.html
@@ -9,7 +9,7 @@
{% block content %}
<section id="cfp" class="section cfp">
<div class="container">
- <p>
+ <!-- <p>
<center>
{% if user and not user.is_anonymous %}
<h2>Submit Proposal</h2>
@@ -69,10 +69,7 @@
</center>
{% endif %}
{% else %}
-
- <hr>
- <div class="row">
- <div class="col-sm-4">
+ <div class="col-sm-4">
<span>
<h2>
<u>Login</u>
@@ -82,7 +79,7 @@
{% if invalid %}
<p style="color:red; font-size:15px;">* Invalid Username/Password</p>
{% endif %}
- <!-- <div id = "my_form"> -->
+ <!-- <div id = "my_form">
<form action="" method="POST">
{{ form.as_p }}
<button class="button special" name ="login" type="submit">Login</button>
@@ -92,7 +89,7 @@
<a href="/2017/forgotpassword/">Forgot Password?</a>
{% csrf_token %}
</form>
- <!-- </div> -->
+ <!-- </div>
<p>Or Sign in with:&nbsp;<br>
<a href="{% url 'social:begin' 'google-oauth2' %}?next={{ request.path }}" class="btn btn-social-icon " style="color:#d34836;">
<i class="fa fa-google-plus-square" style="font-size:40px;"></i>
@@ -118,31 +115,46 @@
</li>
</ul>
</p>
+ </div> -->
+ <div class="row">
+ <div class="col-md-12" >
+ <h3> Call for Papers</h3>
+ </div>
</div>
-
- <div class="col-sm-4" align="justify" style="background-color: #cef3f8;">
+ <div class="row">
+ <div class="col-md-12" style="font-weight: 500;">
+ <p class="text-justify">We invite papers on Chemical Process Modelling, Simulation and Optimization. Time duration for oral presentation will be 15 minutes. Accepted papers will be published in conference proceedings. Award will be given to best paper and best poster.</p>
+ <p class="text-justify">Paper submission starts on September 10 2018.</p>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-sm-6" align="justify">
<br>
<h4 class="panel-title">
- Guidelines for a Proposal
+ General guidelines for paper submission:
</h4>
- <ul style="margin-left: -6%;">
- <li>The project should be an actual implementation rather than just an idea.</li>
- <li>Besides implementation, the submission can also be about experiences and usage of Python, Python-based tools and libraries for research or teaching.</li>
- <li>Abstract should be of 300 to 700 words describing the topic, including its relevance to scientific computing or the use of Python in education.</li>
- <li>All selected proposals must be presented at the conference by atleast one author.</li>
+ <ul style="margin-top: 2%;">
+ <li>Papers are invited on chemical process, modelling, simulation, and optimization. </li>
+ <li>Use of open source software such as DWSIM and OpenModelica will be preferred.</li>
+ <li>Authors must submit the manuscript up to 6 pages of length including tables, figures and references in the required 2-column format as described in the template below.</li>
+ <li>Submissions will be judged on originality, significance, interest, clarity, relevance, and presentation.</li>
+ <li>Authors should ensure that their work doesn’t contain plagiarized content and not under copyright elsewhere.</li>
+ <li>Please download the appropriate file for structure of the paper. We encourage use of LaTeX for creating paper.(Click for <a href= "https://static.fossee.in/dwsim/nccps-templates/LaTeX-TEMPLATE.zip" target="_blank" style="color: #806600">LaTeX</a>/ <a href="https://static.fossee.in/dwsim/nccps-templates/WORD-TEMPLATE.zip" target="_blank" style="color: #806600">Word template</a>)</li>
</ul>
</div>
- <div class="col-sm-4" align="justify" style="background-color: #8cc9f0;">
+ <div class="col-sm-6" align="justify">
<br>
<h4 class="panel-title">
- Guidelines for a Workshop
+ Suggested Contents of a paper
</h4>
- <ul style="margin-left: -6%;">
- <li>There are two parallel tracks, one for beginners and one for advanced users.</li>
- <li>The workshops should be hands-on with plenty of exercises for the users.</li>
- <li>It is advisable to pick particular problem(s) and orient your workshop around how to solve those using the package you plan to talk about.</li>
- <li>Provide us with links to any resources you have already prepared for the workshop.</li>
+ <ul style="margin-top: 2%;">
+ <li> Selection of a topic</li>
+ <li> Importance of a topic</li>
+ <li>Any difficulties while solving with open source software.</li>
+ <li>The methodology followed to overcome these difficulties(any assumptions, data regression, custom modelling, etc.)</li>
+ <li>Validation of the results with published papers/experimentation/commercial simulators like CHEMCAD, Aspen Plus, UniSim etc.</li>
+ <li>Sensitivity studies, adjust, some tricks used for faster calculation etc done to optimize results and reduce simulation time.</li>
</ul>
</div>
diff --git a/static/website/templates/comment-abstract.html b/static/website/templates/comment-abstract.html
new file mode 100755
index 0000000..b6dd3a2
--- /dev/null
+++ b/static/website/templates/comment-abstract.html
@@ -0,0 +1,98 @@
+{% extends "base.html" %}
+{% load static %}
+{% load widget_tweaks %}
+{% block content %}
+
+<section id="comment_abstract" class="section comment_abstract">
+ <div class="container">
+ <p>
+ <center>
+ {% if proposal.proposal_type == "ABSTRACT"%}
+ <h2>Abstract Details</h2>
+ {% else %}
+ <h2>Workshop Details</h2>
+ {% endif %}
+ </center>
+ </p>
+ <h3>{{ proposal.user.first_name }} {{ proposal.user.last_name }}</h3>
+ <p><b>Title: </b>&nbsp;{{ proposal.title }}</p>
+ <p align="justify"><b>About Me: </b>&nbsp;{{ proposal.about_me |linebreaks }}</p>
+ {% if proposal.proposal_type == "ABSTRACT"%}
+ <p align="justify"><b>Abstract:</b>&nbsp;
+ {% else %}
+ <p align="justify"><b>Description:</b>&nbsp;
+ {% endif %}
+ {{ proposal.abstract | linebreaks }}
+ </p>
+ {% if proposal.prerequisite %}
+ <p align="justify"><b>Prerequisite: </b>&nbsp;{{ proposal.prerequisite| linebreaks }}</p>
+ {% endif%}
+ <p><b>Duration: </b>&nbsp;{{ proposal.duration }} {% if proposal.proposal_type == "ABSTRACT"%} Mins {% else %}Hours {%endif%}</p>
+ {% if proposal.proposal_type == "ABSTRACT"%}
+ <p><b>Tags: </b>&nbsp;{{ proposal.tags }}</p>
+ {% else %}
+ <p><b>Level: </b>&nbsp;{{ proposal.tags }}</p>
+ {% endif %}
+ {% if url %}
+ <b>Attachment: </b>&nbsp;<a href="{{ url }}" class="btn btn-info" target="_blank">{{ filename }}</a>
+ {% endif %}
+ <p><b>Date Created: </b>&nbsp;{{ proposal.date_created }}</p>
+ <form action="{% url 'website:rate_proposal' proposal.id %}" method='POST' enctype="multipart/form-data">
+ {% csrf_token %}
+ <b>Ratings :</b>
+ <select name="rating" style="width:70px;" >
+ <!--Call run() function-->
+ <option value="0">0</option>
+ <option value="1">1</option>
+ <option value="2">2</option>
+ <option value="3">3</option>
+ <option value="4">4</option>
+ <option value="5">5</option>
+ <option value="6">6</option>
+ <option value="7">7</option>
+ <option value="8">8</option>
+ <option value="9">9</option>
+ <option value="10">10</option>
+ </select>
+ /10 &nbsp;
+ <input class="btn btn btn-primary" type="submit" value="Rate">
+ </form>
+ <h4>Ratings</h4>
+ {% for rate in rates %}
+ <div>
+ {{rate.rating}}/10
+ by - {{ rate.user }}
+ </div>
+ {% endfor %}
+ <hr>
+ <h4>Comments</h4>
+ {% for comment in comments %}
+ <div>
+ <strong>Comment By:</strong>
+ {{ comment.user.first_name }} {{ comment.user.last_name }}
+ <p>{{ comment.comment| linebreaks }}</p>
+ <!-- {% if user == comment.user %}
+ <form action="" method='POST' enctype="multipart/form-data">
+ {% csrf_token %}
+ {% endif %} -->
+ </div>
+ <hr>
+ </form>
+ {% endfor %}
+ <form action="{% url 'website:comment_abstract' proposal.id %}" method='POST' enctype="multipart/form-data">
+ {% csrf_token %}
+ <textarea rows="5" cols="100" id="comment" class= "comment" name="comment" placeholder = "Add commnet here..."></textarea><br/>
+ <input class="button special" type="submit" value="Comment">
+ </form>
+ <!-- <form action="{% url 'website:status' proposal.id %}" method='POST'>{% csrf_token %}
+ <input type="submit" class="button special" style="background:green" value="Accept" name="accept"/>
+ <input type="submit" class="button special" style="background:red "value="Reject" name="reject"/>
+ <input type="submit" class="button special" style="background:grey "value="Resubmit" name="resubmit"/>
+
+ </form>
+ -->
+ </div>
+ </section>
+ {% endblock %}
+
+
diff --git a/static/website/templates/edit-proposal.html b/static/website/templates/edit-proposal.html
new file mode 100755
index 0000000..fdcc39b
--- /dev/null
+++ b/static/website/templates/edit-proposal.html
@@ -0,0 +1,35 @@
+{% extends "base.html" %}
+{% load static %}
+{% load widget_tweaks %}
+{% block content %}
+
+<section id="edit_proposal" class="section edit_proposal">
+ <div class="container">
+ <p>
+ <center>
+ {% if proposal.proposal_type == "ABSTRACT" %}
+ <h2>Edit Abstract Proposal</h2>
+ {% else %}
+ <h2>Edit Workshop Proposal</h2>
+ {% endif %}
+ </center>
+ </p>
+ <h3><span class="label label-primary">{{ proposal.user.first_name }} {{ proposal.user.last_name }}</span></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" type="submit">Submit</button></center>
+ </form>
+ <br>
+ </div>
+ </section>
+ {% endblock %}
diff --git a/static/website/templates/header.html b/static/website/templates/header.html
index e13720e..f9d9c53 100644
--- a/static/website/templates/header.html
+++ b/static/website/templates/header.html
@@ -9,7 +9,7 @@
<meta name="title" content="NCCPS-2018">
<meta name="description" content="The National Conference on Chemical Process Simulation-2018 is a confluence of academia and industry. This is an excellent opportunity for fostering academic and industrial collaborations. It is the place to meet the experts in chemical process simulation from all over the country. This conference provides a national platform to showcase the work done in this area by students and faculty.">
<meta name="keywords" content="DWSIM, OpenModelica, FOSSEE, NCCPS-2018, Chemical Engineering, IIT Bombay, MHRD">
- <!-- <link rel="icon" href="{% static 'website/bootstrap-css/assets/images/logo.png' %}" type="icon"> -->
+ <link rel="icon" href="{% static 'website/bootstrap-css/assets/images/favicon.png' %}" type="icon">
<title>NCCPS 2018</title>
<script src="{% static 'website/bootstrap-css/assets/js/1.5.2/jquery.min.js' %}"></script>
<script src="{% static 'website/bootstrap-css/assets/js/2.8.2/modernizr.js' %}"></script>
@@ -19,7 +19,6 @@
<link rel="stylesheet" href="{% static 'website/bootstrap-css/bower_components/bootstrap/dist/css/bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'website/bootstrap-css/bower_components/ionicons/css/ionicons.min.css' %}">
<link rel="stylesheet" href="{% static 'website/bootstrap-css/assets/css/main.css' %}">
- <link rel="stylesheet" href="{% static 'website/bootstrap-css/assets/css/custom.css' %}">
<link rel="stylesheet" href="{% static 'website/bootstrap-css/custom.css' %}">
<script type="text/javascript">
// Wait for window load
diff --git a/static/website/templates/home.html b/static/website/templates/home.html
index b171f15..a267961 100644
--- a/static/website/templates/home.html
+++ b/static/website/templates/home.html
@@ -4,15 +4,8 @@
<div id="home" data="home"></div>
<header id="site-header" class="site-header valign-center img-fluid">
<div class="intro">
-
- <!-- <h2>21 &amp; 22 December, 2018 / IIT Bombay</h2>
-
- <h1>National Conference on Chemical Process Simulation - 2018</h1> -->
-
- <!-- <p>International conference on Python for education and computing</p> -->
-
<img class="img img-fluid" src="{% static 'website/bootstrap-css/assets/images/backgrounds/top_2.png' %}" alt=""> <br><br>
- <a class="btn btn-primary" data-scroll href="#submit">Submit a paper</a> <br><br>
+ <a class="btn btn-primary" href="{% url 'website:cfp' %}">Submit a paper</a> <br><br>
</div>
</header>
@@ -25,30 +18,11 @@
<p class="text-justify">The National Conference on Chemical Process Simulation-2018 is a confluence of academia and industry. This is an excellent opportunity for fostering academic and industrial collaborations. It is the place to meet the experts in chemical process simulation from all over the country. This conference provides a national platform to showcase the work done in this area by students and faculty.
</p>
-
- <!-- <figure>
- <img alt="" class="img-responsive" src="bootstrap-css/assets/images/about-us.jpg">
- </figure> -->
-
</div><!-- /.col-sm-6 -->
<div class="col-sm-6">
-
- <!-- <h3 class="section-title multiple-title">What is Our Goal?</h3>
-
- <p class="text-justify">One of the goals of the conference is to combine education, engineering, and science with computing through the medium of Python and thereby extrapolate on how powerful Scientific Computing is in various fields and among different communities.</p>
-
- <ul class="list-arrow-right">
-
- <li>Have hands on sessions</li>
- </ul> -->
<h3 class="section-title multiple-title" align="center"><u>News and Updates</u></h3>
<a class="twitter-timeline" data-width="500" data-height="380" href="https://twitter.com/nccps2018?ref_src=twsrc%5Etfw">Tweets by nccps2018</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
- <!--
- <a class="twitter-timeline" href="https://twitter.com/FOSSEENMEICT" data-widget-id="1031487038086762496" data-width="100%">Tweets by @FOSSEENMEICT</a>
-
-<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> -->
-
</div><!-- /.col-sm-6 -->
</div><!-- /.row -->
</div><!-- /.container -->
@@ -58,28 +32,16 @@
<div class="container">
<div class="row">
<div class="col-sm-4">
-
<i class="ion-ios-calendar"></i>
<h3>November 26 <br>2018</h3>
-
</div>
<div class="col-sm-4">
-
<i class="ion-ios-location"></i>
<h3>Lecture Hall Complex, <br>IIT Bombay</h3>
-
</div>
- <!-- <div class="col-sm-3">
-
- <i class="ion-pricetags"></i>
- <h3>Over 300<br>Tickets</h3>
-
- </div> -->
<div class="col-sm-4">
-
<i class="ion-speakerphone"></i>
<h3>Paper Submission in Progress</h3>
-
</div>
</div><!-- row -->
</div><!-- container -->
@@ -89,37 +51,13 @@
<div class="container">
<div class="row">
<div class="col-md-12">
-
<h3 class="section-title">Speakers</h3>
-
</div>
</div>
<div class="row">
- <!-- <div class="col-md-4">
- <div class="speaker">
-
- <figure>
- <img alt="" class="img-responsive center-block img-rounded" src="{% static 'website/bootstrap-css/assets/images/speakers/dummy.png' %}" style="max-width: 70%;">
- </figure>
-
- <h4>ABC XYZ</h4>
-
- <p>WXYZ QWERTY</p>
-
- <ul class="social-block">
- <li><a href=""><i class="ion-social-twitter"></i></a></li>
- <li><a href=""><i class="ion-social-facebook"></i></a></li>
- <li><a href=""><i class="ion-social-linkedin-outline"></i></a></li>
- <li><a href=""><i class="ion-social-googleplus"></i></a></li>
- </ul>
-
- </div><!-- /.speaker -->
- <!-- </div> --> <!-- /.col-md-4 -->
-
<div class="col-md-6">
<div class="speaker">
-
<figure>
<img alt="" class="img-responsive center-block img-rounded" src="{% static 'website/bootstrap-css/assets/images/speakers/madhavan.png' %}" style="max-width: 70%;height: 253px;" data-toggle="modal" data-target="#myModal">
</figure>
@@ -127,17 +65,9 @@
<h4>Prof. K P Madhavan</h4>
<p style="text-transform: none;">Emeritus Professor, Dept. of Chemical Engineering, IIT Bombay</p>
-
- <!--<ul class="social-block">
- <li><a href=""><i class="ion-social-twitter"></i></a></li>
- <li><a href=""><i class="ion-social-facebook"></i></a></li>
- <li><a href=""><i class="ion-social-linkedin-outline"></i></a></li>
- <li><a href=""><i class="ion-social-googleplus"></i></a></li>
- </ul> -->
<div class="modal fade spkrmodal" id="myModal" role="dialog">
<div class="modal-dialog">
-
- <!-- Modal content-->
+ <!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
@@ -150,7 +80,6 @@
<button type="button" class="btn btn-info" data-dismiss="modal">Close</button>
</div>
</div>
-
</div>
</div>
</div><!-- /.speaker -->
@@ -158,24 +87,13 @@
<div class="col-md-6">
<div class="speaker">
-
<figure>
<img alt="" class="img-responsive center-block img-rounded" src="{% static 'website/bootstrap-css/assets/images/speakers/alok.png' %}" style="max-width: 70%;height: 253px;" data-toggle="modal" data-target="#myModal1">
</figure>
-
<h4>Mr. Alok Pandit</h4>
-
<p style="text-transform: none;">Equinox Software and Services Private Limited</p>
-
- <!-- <ul class="social-block">
- <li><a href=""><i class="ion-social-twitter"></i></a></li>
- <li><a href=""><i class="ion-social-facebook"></i></a></li>
- <li><a href=""><i class="ion-social-linkedin-outline"></i></a></li>
- <li><a href=""><i class="ion-social-googleplus"></i></a></li>
- </ul> -->
<div class="modal fade spkrmodal" id="myModal1" role="dialog">
<div class="modal-dialog">
-
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
@@ -189,7 +107,6 @@
<button type="button" class="btn btn-info" data-dismiss="modal">Close</button>
</div>
</div>
-
</div>
</div>
</div><!-- /.speaker -->
@@ -197,37 +114,167 @@
</div><!-- /.row -->
</div>
</section>
-<!-- <section id="registration" class="section registration">
- <div class="container">
+
+ <section id="registration" class="section registration">
+ <div class="container">
<div class="row">
<div class="col-md-12">
<h3 class="section-title">Registration</h3>
</div>
</div>
<div class="row">
- <div class="col-md-12"><p class="text-justify">
- This ticket allows you to ONLY attend the conference (workshops,oral & poster presentations, job fair) for 1 Day including breakfast, Lunch, Tea. It does not include Accommodation, Dinner & T-Shirt. This is a non-refundable and non-transferable ticket. There will be an additional 18% charge for GST.</p></div>
+ <div class="col-md-12">
+ <p class="text-justify">
+ This ticket allows you to ONLY attend the conference (workshops,oral & poster presentations, job fair) for 1 Day including breakfast, Lunch, Tea. It does not include Accommodation, Dinner & T-Shirt. This is a non-refundable and non-transferable ticket. There will be an additional 18% charge for GST.
+ </p>
</div>
-
</div>
-</section> -->
-
-<!--
-
- <section id="contribution" class="section bg-image-2 contribution">
- <div class="container">
<div class="row">
- <div class="col-md-12">
- <h3 class="text-uppercase mt0 font-400">Submit a Paper</h3>
-
- <p>We invite papers on Chemical Process Modelling, Simulation and Optimization. Time duration for oral presentation will be 15 minutes. Accepted papers will be published in conference proceedings.</p>
-
- <a class="btn btn-white" href="#">Submit</a>
+ <div class="col-md-12 schedule-box">
+ <table class="table table-bordered table-responsive">
+ <tr class="schedule-header">
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Ticket type
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Student
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Faculty
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Industry participant
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Regular Registration
+ <br>(15 Sept 2018 - 25 Oct 2018)
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Rs. 750
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Rs. 1,000
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Rs. 2,000
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Late Registration
+ <br>(26 Oct 2018 - 25 Nov 2018)
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Rs. 900
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Rs. 1,200
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Rs. 2,500
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Spot Registration
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Rs. 1,100
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Rs. 1,500
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Rs. 3,000
+ </div>
+ </td>
+ </tr>
+ </table>
</div>
</div>
- </div>
+ <div class="row">
+ <div class="col-md-12">
+ <p class="text-justify" style="color: red;">
+ *Spot registration will be subject to availability.
+ </p>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-12 schedule-box">
+ <table class="table table-bordered table-responsive">
+ <tr>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Accomodation<br>
+ Add on
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ We have limited Low cost accommodation, guaranteed only if you register early.
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ T Shirt<br>
+ Rs 350/-<br>
+ Add on
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Change of size, exchange at the venue is not available. This is a non-refundable and non-transferable ticket.
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-12">
+ <center>
+ <a data-toggle="modal" data-target="#registermdl" class="btn btn-primary">Register now</a>
+ </center>
+ </div>
+ </div>
+ </div>
</section>
--->
+
<section id="coc" class="section coc">
<div class="container">
<div class="row">
@@ -275,6 +322,7 @@
</div>
</div>
+ </p>
<center>
<button type="button" class="btn btn-black" data-toggle="collapse" data-target="#demo">
<i class="fa fa-arrow-down" aria-hidden="true"></i>
@@ -282,6 +330,8 @@
</button>
</center>
</div>
+ </div>
+ </div>
</section>
@@ -289,17 +339,142 @@
<div class="container">
<div class="row">
<div class="col-md-12">
- <h3 class="section-title">Event Schedule</h3>
+ <h3 class="section-title">Tentative Schedule</h3>
</div>
</div>
<div class="row">
- <div class="col-md-12 col-sm-12">
- <div class="schedule-box">
- <div class="time">
- <!-- <time datetime="09:00">09:00 am</time> - <time datetime="22:00">10:00 am</time> -->
- </div>
- <p>TBD</p>
- </div>
+ <div class="col-md-12">
+ <p class="text-justify" style="font-weight: 500;"> Poster session - 8AM onwards</p>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-12 schedule-box">
+ <div>
+ <table class="table table-bordered" style="align-content: center !important;">
+ <tr class="schedule-header">
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Time
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Program
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ 08:00 - 09:00
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Registration
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ 09:00 - 09:30
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Inauguration
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ 09:30 - 10:30
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Invited talks
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ 10:30 - 11:00
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Tea
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ 11:00 - 01:00
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Oral Presentations
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ 01:00 - 02:00
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Lunch
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ 02:00 - 04:00
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ DWSIM/OpenModelica Workshop
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ 04:00 - 04:15
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Tea
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ 04:15 - 05:30
+ </div>
+ </td>
+ <td style="vertical-align:bottom;border-top:none;!important">
+ <div class="align-baseline">
+ Panel Discussion, Valedictory
+ </div>
+ </td>
+ </tr>
+
+
+ </table>
+ </div>
</div>
</div>
</section>
@@ -330,86 +505,13 @@
<div class="row">
<div class="col-sm-6">
<a href="https://fossee.in" class="organiser-box organiser-box-1" target="_blank"></a>
- <!-- <p class="text-justify">NCCPS conference is organised by the team members of FOSSEE project which is part of the National Mission on Education through ICT with the thrust area being Adaptation and deployment of open source simulation packages equivalent to proprietary software, funded by MHRD, based at the Indian Institute of Technology Bombay (IITB). </p> -->
</div>
<div class="col-sm-6">
<a href="https://www.che.iitb.ac.in/online/" class="organiser-box organiser-box-2" target="_blank"></a>
</div>
</div>
- <!-- <div class="row">
- <div class="col-sm-12">
- <p class="text-justify">NCCPS conference is organised by the team members of FOSSEE project which is part of the National Mission on Education through ICT with the thrust area being Adaptation and deployment of open source simulation packages equivalent to proprietary software, funded by MHRD, based at the Indian Institute of Technology Bombay (IITB). </p>
- </div>
- </div> -->
</section>
-<!--
- <section id="sponsor" class="section sponsor">
- <div class="container">
- <div class="row">
- <div class="col-md-12">
- <h3 class="section-title">Sponsor</h3>
- </div>
- </div>
- <div class="row">
- <div class="col-sm-12">
- <a href="http://mhrd.gov.in" class="sponsor-box sponsor-box-1" target="_blank"></a>
- </div>
- </div>
- <div class="row">
- <div class="col-sm-12">
- <p class="text-justify">
- Thank you for your interest to sponsor Scipy India 2018.</p>
-<p class="text-justify">
- NCCPS India, an annual conference organized by FOSSEE (Free and Open Source Software for Education) based at IIT Bombay, provides the opportunity to unfurl the use of the Python programming language in the Scientific Computing community in India. NCCPS India being organized since 2009, attracts more than 250 students and faculty every year. This conference provides the participants with a unique opportunity to interact and connect with the Python community.
-</p><p class="text-justify">
- Here’s a call to the interested organizations to sponsor this conference and get associated with the event. Through this sponsorship, you could engage with top professionals and enhance your organization’s brand visibility amongst Python users.
- </p>
- </div>
- </div>
- </section>
-
- <section id="write-us" class="section write-us">
- <div class="container">
- <div class="row">
- <div class="col-md-12">
- <h3 class="section-title">Write to Us</h3>
- <p><h5>Feel free to send us an email if you have any questions.</h5></p>
- </div>
- </div>
-
- <form action="#" id="registration-form">
- <div class="row">
- <div class="col-md-12" id="registration-msg" style="display:none;">
- <div class="alert"></div>
- </div>
- <div class="col-sm-12">
- <div class="form-group">
- <input type="text" class="form-control" placeholder="First Name" id="fname" name="fname" required>
- </div>
-
- <div class="form-group">
- <input type="text" class="form-control" placeholder="Last Name" id="lname" name="lname" required>
- </div>
-
- <div class="form-group">
- <input type="email" class="form-control" placeholder="Email" id="email" name="email" required>
- </div>
- </div>
-
- <div class="col-sm-12">
- <div class="form-group">
- <input type="textarea" class="form-control" placeholder="Your Query" id="query" name="query" required>
- </div>
- </div>
- </div>
- <div class="text-center mt20">
- <button type="submit" class="btn btn-black" id="registration-submit-btn">Submit</button>
- </div>
- </form>
- </div>
- </section> -->
-
<section id="contact-us" class="section contact-us">
<div class="container">
<div class="row">
@@ -460,25 +562,19 @@
</div>
</div>
</section>
-
-<div class="modal fade spkrmodal" id="registermdl" role="dialog">
- <div class="modal-dialog">
-
- <!-- Modal content-->
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">&times;</button>
- </div>
- <div class="modal-body">
- <p class="text-justify">Registrations open from 15 September</p>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-info" data-dismiss="modal">Close</button>
- </div>
- </div>
-
- </div>
- </div>
-
-
+<div class="modal fade" id="registermdl" role="dialog">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">&times;</button>
+ </div>
+ <div class="modal-body">
+ <p class="text-justify">Registrations open from 15 September</p>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-info" data-dismiss="modal">Close</button>
+ </div>
+ </div>
+ </div>
+</div>
{% endblock %}
diff --git a/static/website/templates/navbar.html b/static/website/templates/navbar.html
index 41a1106..ce70dcc 100644
--- a/static/website/templates/navbar.html
+++ b/static/website/templates/navbar.html
@@ -32,28 +32,23 @@
<!-- navigation menu -->
<li class="active"><a data-scroll href="{{SITE_URL}}/#about">About</a></li>
<li><a data-scroll href="{{SITE_URL}}/#speakers">Speakers</a></li>
- <li><a data-scroll href="{{SITE_URL}}/#submit">CFP</a></li>
+ <li><a data-scroll href="{{SITE_URL}}/#registration">Register</a></li>
+ <!-- <li><a data-scroll href="{{SITE_URL}}/#submit">CFP</a></li> -->
<li><a data-scroll href="{{SITE_URL}}/#coc">C0C</a></li>
+ <li><a data-scroll href="{{SITE_URL}}/#schedule">Schedule</a></li>
<li><a data-scroll href="{{SITE_URL}}/#location">Venue</a></li>
<li><a data-scroll href="{{SITE_URL}}/#organiser">Organiser</a></li>
<li><a data-scroll href="{{SITE_URL}}/#contact-us">Contact Us</a></li>
- <li><a class="btn" data-toggle="modal" data-target="#registermdl">Register</a></li>
- <!--<li><a data-scroll href="{{SITE_URL}}/#schedule">Schedule</a></li>
- <li><a data-scroll href="{{SITE_URL}}/#sponsor">Sponsor</a></li>
- <li><a data-scroll href="{{SITE_URL}}/#faq">FAQ</a></li>
- <li><a data-scroll href="{{SITE_URL}}/#photos">Photos</a></li>
- <li><a data-scroll href="{{SITE_URL}}/#team">Team</a></li> -->
- <!-- {% if user.is_authenticated %}
+ {% if user.is_authenticated %}
<li><a href="{% url 'login' %}"><i class="fa fa-user" aria-hidden="true"></i>
{{ user.username }}!</a></li>
<li><a href="{% url 'logout' %}">logout</a></li>
{% else %}
- <li><a href="{% url 'login' %}">login</a></li>
- {% endif %} -->
+ <li><a href="{% url 'website:cfp' %}">cfp</a></li>
+ {% endif %}
</ul>
</div>
</div><!-- /.container -->
</nav>
-
{% endblock %}
diff --git a/static/website/templates/registration/password_change_done.html b/static/website/templates/registration/password_change_done.html
new file mode 100755
index 0000000..67fd9a6
--- /dev/null
+++ b/static/website/templates/registration/password_change_done.html
@@ -0,0 +1,47 @@
+
+{% load static %}
+
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ <meta name="description" content="">
+ <meta name="author" content="">
+ <link rel="icon" href="{% static 'img/fevicon.png'%}" type="icon">
+ <title>SciPy India 2017</title>
+ <!-- Bootstrap core CSS -->
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+ <link href="{% static 'vendor/bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
+ <!-- Custom styles for this template -->
+ <link href="{% static 'css/one-page-wonder.css' %}" rel="stylesheet">
+ </head>
+ <body>
+
+
+ {% block header %}
+ <header id="header1" style="background-color: #01c3d9;">
+ <center>
+ <h1>SciPy India 2017</h1>
+ <h2>Reset Password</h2>
+ </center>
+ </header>
+{% endblock %}
+
+{% block content %}
+<div id="wrapper" style="margin-left: 10%;">
+<div id="main">
+<section id="content" class="main">
+
+<script type="text/javascript">
+ window.setTimeout(function()
+ {
+ location.href="{{ URL_ROOT }}/accounts/"
+ }, 2000);
+</script>
+<h3>Your password has been changed successfully.</h3>
+<h4>Redirecting ...</h4>
+</section>
+</div>
+</div>
+{% endblock %} \ No newline at end of file
diff --git a/static/website/templates/registration/password_change_form.html b/static/website/templates/registration/password_change_form.html
new file mode 100755
index 0000000..a27c585
--- /dev/null
+++ b/static/website/templates/registration/password_change_form.html
@@ -0,0 +1,49 @@
+
+{% load static %}
+
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ <meta name="description" content="">
+ <meta name="author" content="">
+ <link rel="icon" href="{% static 'img/fevicon.png'%}" type="icon">
+ <title>SciPy India 2017</title>
+ <!-- Bootstrap core CSS -->
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+ <link href="{% static 'vendor/bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
+ <!-- Custom styles for this template -->
+ <link href="{% static 'css/one-page-wonder.css' %}" rel="stylesheet">
+ </head>
+ <body>
+
+
+ {% block header %}
+ <header id="header1" style="background-color: #01c3d9;">
+ <center>
+ <h1>SciPy India 2017</h1>
+ <h2>Reset Password</h2>
+ </center>
+</header>
+{% endblock %}
+
+{% block content %}
+<div id="wrapper" style="margin-left: 10%;">
+<div id="main">
+<section id="content" class="main">
+<br>
+<form action="" method="post" >
+ {% csrf_token %}
+ <center>
+ <table class=span1>
+ {{ form }}
+ </table>
+ </center>
+ <center><button class="btn" type="submit">Change Password</button>
+ <button class="btn btn-primary gradient" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/accounts/");'>Cancel</button></center>
+</form>
+</section>
+</div>
+</div>
+{% endblock %}
diff --git a/static/website/templates/registration/password_reset_complete.html b/static/website/templates/registration/password_reset_complete.html
new file mode 100755
index 0000000..b8a6131
--- /dev/null
+++ b/static/website/templates/registration/password_reset_complete.html
@@ -0,0 +1,41 @@
+
+{% load static %}
+
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ <meta name="description" content="">
+ <meta name="author" content="">
+ <link rel="icon" href="{% static 'img/fevicon.png'%}" type="icon">
+ <title>SciPy India 2017</title>
+ <!-- Bootstrap core CSS -->
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+ <link href="{% static 'vendor/bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
+ <!-- Custom styles for this template -->
+ <link href="{% static 'css/one-page-wonder.css' %}" rel="stylesheet">
+ </head>
+ <body>
+
+
+ {% block header %}
+ <header id="header1" style="background-color: #01c3d9;">
+ <center>
+ <h1>SciPy India 2017</h1>
+ <h2>Reset Password</h2>
+ </center>
+ </header>
+{% endblock %}
+
+{% block content %}
+<div id="wrapper" style="margin-left: 10%;">
+<div id="main">
+<section id="content" class="main">
+<br>
+<p>Your password has been reset. </p>
+<p>Please <a href="{% url 'website:cfp' %}">Log in</a> with your new password.</p>
+</section>
+</div>
+</div>
+{% endblock %}
diff --git a/static/website/templates/registration/password_reset_confirm.html b/static/website/templates/registration/password_reset_confirm.html
new file mode 100755
index 0000000..895e30d
--- /dev/null
+++ b/static/website/templates/registration/password_reset_confirm.html
@@ -0,0 +1,91 @@
+{% load static %}
+
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ <meta name="description" content="">
+ <meta name="author" content="">
+ <link rel="icon" href="{% static 'img/fevicon.png'%}" type="icon">
+ <title>SciPy India 2017</title>
+ <!-- Bootstrap core CSS -->
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+ <link href="{% static 'vendor/bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
+ <!-- Custom styles for this template -->
+ <link href="{% static 'css/one-page-wonder.css' %}" rel="stylesheet">
+ </head>
+ <body>
+
+
+ {% block header %}
+ <header id="header1" style="background-color: #01c3d9;">
+ <center>
+ <h1>SciPy India 2017</h1>
+ <h2>Reset Password</h2>
+ </center>
+ </header>
+{% endblock %}
+
+{% block content %}
+<div id="wrapper" style="margin-left: 10%;">
+<div id="main">
+<section id="content" class="main">
+ {% if validlink %}
+ <br>
+ <p>Please enter your new password twice.</p>
+ <br>
+ <form action="" method="post">
+ <div style="display:none">
+ <input type="hidden" value="{{ csrf_token }}" name="csrfmiddlewaretoken">
+ </div>
+ <table>
+ <colgroup>
+ <col width="40%" />
+ <col width="60%" />
+ </colgroup>
+ <tr>
+ <td>{{ form.new_password1.errors }}
+ <label for="id_new_password1" >New password:</label></td>
+ <td>{{ form.new_password1 }}</td>
+ </tr>
+ <tr>
+ <td>{{ form.new_password2.errors }}
+ <label for="id_new_password2" >Confirm password:</label></td>
+ <td>{{ form.new_password2 }}</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td><br> <button class= "btn btn-sm btn-primary gradient" type="submit" onclick="return checkform(this);">Submit</button>
+ </tr>
+ <br>
+ </table>
+ </form>
+ {% else %}
+ <p>The password reset link is invalid,
+ possibly because it has already been used. <br />
+ Please request a new password reset.</p><br/>
+ {% endif %}
+</section>
+</div>
+</div>
+
+<script>
+function checkform(form) {
+ // alert("in");
+ var pwd1 = document.getElementById("id_new_password1");
+ // alert(pwd1.value);
+ var pwd2 = document.getElementById("id_new_password2");
+ //return false;
+ if(pwd1.value.length && pwd2.value.length < 8) {
+
+ alert("Error: Password must contain at least eight characters!");
+ pwd1.focus();
+ pwd1.value = "";
+ pwd2.value = "";
+ return false;
+ }
+}
+
+</script>
+{% endblock %}
diff --git a/static/website/templates/registration/password_reset_done.html b/static/website/templates/registration/password_reset_done.html
new file mode 100755
index 0000000..e161e5e
--- /dev/null
+++ b/static/website/templates/registration/password_reset_done.html
@@ -0,0 +1,41 @@
+{% load static %}
+
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ <meta name="description" content="">
+ <meta name="author" content="">
+ <link rel="icon" href="{% static 'img/fevicon.png'%}" type="icon">
+ <title>SciPy India 2017</title>
+ <!-- Bootstrap core CSS -->
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+ <link href="{% static 'vendor/bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
+ <!-- Custom styles for this template -->
+ <link href="{% static 'css/one-page-wonder.css' %}" rel="stylesheet">
+ </head>
+ <body>
+
+<center>
+ {% block header %}
+ <header id="header1" style="background-color: #01c3d9;">
+ <br>
+ <h1>SciPy India 2017</h1>
+ <h2>Reset Password</h2>
+ <br>
+</header>
+</center>
+{% endblock %}
+
+
+{% block content %}
+<div id="wrapper">
+<div id="main">
+<section id="content" class="main" style="margin-left: 10%;">
+<br>
+ If an account exists with this email, you would receive the password reset instructions shortly. Please check your spam folder too.<br/>
+</section>
+</div>
+</div>
+ {% endblock %}
diff --git a/static/website/templates/registration/password_reset_form.html b/static/website/templates/registration/password_reset_form.html
new file mode 100755
index 0000000..b5d900a
--- /dev/null
+++ b/static/website/templates/registration/password_reset_form.html
@@ -0,0 +1,26 @@
+{% extends "base.html" %}
+{% load static %}
+ {% block content %}
+<section id="password_reset" class="section password_reset container-fluid">
+<div class="container">
+
+<div><h4> Recovery Email </h4></div>
+<br>
+ Kindly enter your email ID used for registration. The password reset link will be mailed to the same.
+<br><br>
+<form action="" method="post">
+ {% csrf_token %}
+ {{ form.email.errors }}
+ <p><label for="id_email">E-mail address:</label> {{ form.email }}
+
+ <br/>
+ <br><input type="submit" class ="btn btn-primary gradient" style="border: none;" value="Reset Password" /></p>
+
+ <!-- <button class="btn btn-sm btn-primary" type="submit">Request</button>
+ <a class="btn btn-sm " href="{{URL_ROOT}}/accounts/login/">Cancel</a> -->
+</form>
+</div>
+
+<div class="row" style="margin-top: 4vh;"></div>
+</section>
+{% endblock %}
diff --git a/static/website/templates/submit-cfw.html b/static/website/templates/submit-cfw.html
new file mode 100755
index 0000000..efc746b
--- /dev/null
+++ b/static/website/templates/submit-cfw.html
@@ -0,0 +1,102 @@
+{% extends "base.html" %}
+{% load static %}
+{% load widget_tweaks %}
+{% block content %}
+
+<section id="submitcfw" class="section submitcfw">
+ <div class="container">
+ <p>
+ <center>
+ <h2>Submit Workshop Proposal</h2>
+ </center>
+ </p>
+ <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>
+ <u>Proposal Guidelines</u>
+ </h2>
+ <!-- <li>To be announced</li><br> -->
+ <ul>
+ <li>Please note that there are two parallel tracks, one for beginners and one for advanced users.</li>
+ <li>Please make sure the workshops are hands-on with plenty of exercises for the users.</li>
+ <li>It is usually a good idea to pick a particular problem or set of problems and orient your workshop around how to solve those using the package you plan to talk about.</li>
+ <li>Please provide us with links to any resources you have already prepared for the workshop.</li>
+ <li>The more detail you provide on your workshop, the easier it will be for us to pick it.</li>
+ <li>
+ Provide us with the following sections:
+ <ul>
+ <li>Duration</li>
+ <li>Track: beginner or advanced</li>
+ <li>Intended audience</li>
+ <li>Why should someone attend your workshop? What will they get at the end of it?</li>
+ <li>Outline of workshop with a reasonable breakup in terms of time.</li>
+ <li>Possibly provide any material or similar material you plan to use.</li>
+ <li>A small paragraph about you with an emphasis on your experience in the area and teaching this material. Essentially, why are you well suited to teach this workshop?</li>
+ </ul>
+ </li>
+ </ul>
+ <form action="" method=POST>
+ <div class="form-group">
+ <label for="about_me">About me
+ <span style="color:red;">*</span>:
+ </label>
+ {% render_field proposal_form.about_me %}
+ </div>
+ <div class="form-group">
+ <label for="phone">Phone
+ <span style="color:red;">*</span>:
+ </label>
+ {% render_field proposal_form.phone %}
+ </div>
+ <div class="form-group">
+ <label for="title">Title
+ <span style="color:red;">*</span>:
+ </label>
+ {% render_field proposal_form.title %}
+ </div>
+ <div class="form-group">
+ <label for="dispositiont">Disposition (Min. 300 char.)
+ <span style="color:red;">*</span>:
+ </label>
+ {% render_field proposal_form.abstract %}
+ <label>Charater count:
+ <div id="charNum"></div>
+ </label>
+ </div>
+ <div class="form-group">
+ <label for="duration">Duration (Mins.)
+ <span style="color:red;">*</span>:
+ </label>
+ {% render_field proposal_form.duration %}
+ </div>
+ <div class="form-group">
+ <label for="attachment">Attachments:</label>
+ {% render_field proposal_form.attachment %}
+ <div class="form-group">
+ <label for="tags">Tags:</label>
+ {% render_field proposal_form.tags %}
+ </div>
+ </div>
+ <div class="form-inline">
+ <div class="radio">
+ <label for="open_to_share"> I agree to publish my resources of workshop/presentation on this website
+ <span style="color:red;">*</span>:
+ </label>
+ {% render_field proposal_form.open_to_share %}
+ </div>
+ </div>
+ {% render_field proposal_form.proposal_type %}
+ {% csrf_token %}
+ <center>
+ <button id="subbtn" class="btn btn-info" type="submit" >Submit</button>
+ <a href="{% url 'website:view_abstracts' %}" class="btn btn-info" role="button">Back</a>
+ </center>
+ </form>
+ {% endif %}
+ </div>
+ </section>
+{% endblock %}
diff --git a/static/website/templates/user-register.html b/static/website/templates/user-register.html
new file mode 100755
index 0000000..c5ea301
--- /dev/null
+++ b/static/website/templates/user-register.html
@@ -0,0 +1,43 @@
+{% extends "base.html" %}
+{% load static %}
+<div class="se-pre-con"></div>
+{% block content %}
+ <section id="register" class="section register">
+ <div class="container">
+ <center>
+ <h2>Register</h2>
+ </center>
+ {% if email_registered %}
+ <center>
+ <div class="alert" style="width:300px;height:50px;">
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
+ <p>Email ID is already registered !</p>
+ </div>
+ <p style="line-height:5px;">Have you already logged in using social logins ?</p>
+ <p style="line-height:5px;">or</p>
+ <p style="line-height:5px;"><a href="{% url 'website:forgotpassword' %}">Click Here</a> if you forgot your username or password</p>
+ </center>
+ {% endif %}
+ {% if registration_complete %}
+ <p> Your Account is Created Successfully !</p>
+ {% endif %}
+ <!-- <div class = "col-md-7">
+ <div id = "my_form"> -->
+ <form action="" method="POST">
+
+ {% csrf_token %}
+ {% 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 %}
+ <br>
+ <button class="btn btn-primary" type="submit" >SignUp</button>
+ <a class="btn btn-primary" href="{% url 'website:cfp' %}" style="text-decoration: none;">I have an account</a>
+ <!-- </div> -->
+ </form>
+ <!--</div>-->
+ </section>
+{% endblock %}
diff --git a/website/forms.py b/website/forms.py
index 97f9196..8690ff7 100755
--- a/website/forms.py
+++ b/website/forms.py
@@ -1,11 +1,11 @@
from django import forms
-from django.forms import ModelForm
+from django.forms import ModelForm, widgets
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.core.validators import MinLengthValidator, MinValueValidator, \
-RegexValidator, URLValidator
+ RegexValidator, URLValidator
from captcha.fields import ReCaptchaField
from website.models import Proposal
@@ -30,60 +30,63 @@ MY_CHOICES = (
('Beginner', 'Beginner'),
('Advanced', 'Advanced'),
)
-rating=(
- ('1','1'),
- ('2','2'),
- ('3','3'),
- ('4','4'),
- ('5','5'),
- ('6','6'),
- ('7','7'),
- ('8','8'),
- ('9','9'),
- ('10','10'),
+rating = (
+ ('1', '1'),
+ ('2', '2'),
+ ('3', '3'),
+ ('4', '4'),
+ ('5', '5'),
+ ('6', '6'),
+ ('7', '7'),
+ ('8', '8'),
+ ('9', '9'),
+ ('10', '10'),
)
+CHOICES = [('1', 'Yes'),
+ ('0', 'No')]
+# modal proposal form for cfp
class ProposalForm(forms.ModelForm):
- class Meta:
- model = Proposal
- exclude = ('user', 'email','prerequisite','status','rate')
-
-
about_me = forms.CharField(widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'About Me'}),
- required = True,
- error_messages = {'required':'About me field required.'},
- )
+ required=True,
+ error_messages={
+ 'required': 'About me field required.'},
+ )
attachment = forms.FileField(widget=forms.ClearableFileInput(attrs={'multiple': True}),
- label = 'Please upload relevant documents (if any)',
- required = False,)
- phone = forms.CharField(min_length = 10, max_length = 12, widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Phone'}),required=False, validators = [RegexValidator(regex = '^[0-9-_+.]*$', message='Enter a Valid Phone Number',)],
- # error_messages = {'required':'Title field required.'},
- )
+ label='Please upload relevant documents (if any)',
+ required=False,)
+ phone = forms.CharField(min_length=10, max_length=12, widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Phone'}), required=False, validators=[RegexValidator(regex='^[0-9-_+.]*$', message='Enter a Valid Phone Number',)],
+ # error_messages = {'required':'Title field required.'},
+ )
title = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Title'}),
- required = True,
- error_messages = {'required':'Title field required.'},
+ required=True,
+ error_messages={
+ 'required': 'Title field required.'},
)
- abstract = forms.CharField(min_length = 300, widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'Abstract'}),
- required = True,
- label = 'Abstract (Min. 300 char.)',
- error_messages = {'required':'Abstract field required.'},
- )
- proposal_type = forms.CharField(widget = forms.HiddenInput(), label = '', initial = 'ABSTRACT', required=False)
-
- duration = forms.ChoiceField(choices=abs_duration, label = 'Duration (Mins.)')
+ abstract = forms.CharField(min_length=300, widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'Abstract', 'onkeyup': 'countChar(this)'}),
+ required=True,
+ label='Abstract (Min. 300 char.)',
+ error_messages={
+ 'required': 'Abstract field required.'},
+ )
+ proposal_type = forms.CharField(
+ widget=forms.HiddenInput(), label='', initial='ABSTRACT', required=False)
+
+ duration = forms.ChoiceField(
+ choices=abs_duration, label='Duration (Mins.)')
tags = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Tags'}),
- required = False,
- )
-
+ required=False,
+ )
+ open_to_share = forms.ChoiceField(choices=CHOICES, widget=forms.RadioSelect(), required=True,
+ label='I am agree to publish my content',)
class Meta:
model = Proposal
- exclude = ('user', 'email','prerequisite','status','rate')
-
+ exclude = ('user', 'email', 'prerequisite', 'status', 'rate')
def clean_attachment(self):
import os
@@ -93,43 +96,50 @@ class ProposalForm(forms.ModelForm):
ext = os.path.splitext(attachment.name)[1]
valid_extensions = ['.pdf']
if not ext in valid_extensions:
- raise forms.ValidationError(u'File not supported! Only .pdf file is accepted')
+ raise forms.ValidationError(
+ u'File not supported! Only .pdf file is accepted')
if attachment.size > (5*1024*1024):
raise forms.ValidationError('File size exceeds 5MB')
return attachment
+
+# modal workshop form for cfw
class WorkshopForm(forms.ModelForm):
about_me = forms.CharField(widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'About Me'}),
- required = True,
- error_messages = {'required':'About Me field required.'},
- )
+ required=True,
+ error_messages={
+ 'required': 'About Me field required.'},
+ )
attachment = forms.FileField(widget=forms.ClearableFileInput(attrs={'multiple': True}),
- label = 'Please upload relevant documents (if any)',
- required = False,)
- phone = forms.CharField(min_length = 10, max_length = 12, widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Phone'}),required=False, validators = [RegexValidator(regex = '^[0-9-_+.]*$', message='Enter a Valid Phone Number',)],
- )
+ label='Please upload relevant documents (if any)',
+ required=False,)
+ phone = forms.CharField(min_length=10, max_length=12, widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Phone'}), required=False, validators=[RegexValidator(regex='^[0-9-_+.]*$', message='Enter a Valid Phone Number',)],
+ )
title = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Title'}),
- required = True,
- error_messages = {'required':'Title field required.'},
+ required=True,
+ error_messages={
+ 'required': 'Title field required.'},
)
- abstract = forms.CharField(min_length = 300 ,widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'Desciption'}),
- required = True,
- label = 'Description (Min. 300 char.)',
- error_messages = {'required':'Abstract field required.'},
- )
+ abstract = forms.CharField(min_length=300, widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'Desciption', 'onkeyup': 'countChar(this)'}),
+ required=True,
+ label='Description (Min. 300 char.)',)
+
prerequisite = forms.CharField(widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'Prerequisite'}),
- label = 'Prerequisites',
- required = False,
- )
- proposal_type = forms.CharField(widget = forms.HiddenInput(), label = '', required=False, initial = 'WORKSHOP')
+ label='Prerequisites',
+ required=False,
+ )
+ proposal_type = forms.CharField(
+ widget=forms.HiddenInput(), label='', required=False, initial='WORKSHOP')
- duration = forms.ChoiceField(choices=ws_duration, label = 'Duration (Hrs.)')
+ duration = forms.ChoiceField(choices=ws_duration, label='Duration (Hrs.)')
+
+ tags = forms.ChoiceField(choices=MY_CHOICES, label='Level')
+ open_to_share = forms.ChoiceField(choices=CHOICES, widget=forms.RadioSelect(), required=True,
+ label='I am agree to publish my content',)
- tags = forms.ChoiceField(choices=MY_CHOICES, label = 'Level')
-
class Meta:
model = Proposal
- exclude = ('user', 'email','status','rate')
+ exclude = ('user', 'email', 'status', 'rate')
def clean_attachment(self):
import os
@@ -137,22 +147,69 @@ class WorkshopForm(forms.ModelForm):
attachment = cleaned_data.get('attachment', None)
if attachment:
ext = os.path.splitext(attachment.name)[1]
- valid_extensions = ['.pdf',]
+ valid_extensions = ['.pdf', ]
if not ext in valid_extensions:
- raise forms.ValidationError(u'File not supported! Only .pdf file is accepted')
+ raise forms.ValidationError(
+ u'File not supported! Only .pdf file is accepted')
if attachment.size > (5*1024*1024):
raise forms.ValidationError('File size exceeds 5MB')
return attachment
+class UserRegisterForm(UserCreationForm):
+ class Meta:
+ model = User
+ fields = ('first_name', 'last_name', 'email', 'username', 'password1',
+ 'password2')
+ first_name = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'First Name'}),
+ label='First Name'
+ )
+ last_name = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Last Name'}),
+ label='Last Name'
+ )
+ email = forms.EmailField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Email'}),
+ required=True,
+ error_messages={
+ 'required': 'Email field required.'},
+ label='Email'
+ )
+ username = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Username'}),
+ required=True,
+ error_messages={
+ 'required': 'Username field required.'},
+ label='Username'
+ )
+ password1 = forms.CharField(widget=forms.PasswordInput(attrs={'class': 'form-control', 'placeholder': 'Password'}),
+ required=True,
+ error_messages={
+ 'required': 'Password field required.'},
+ label='Password'
+ )
+ password2 = forms.CharField(widget=forms.PasswordInput(attrs={'class': 'form-control', 'placeholder': 'Confirm Password'}),
+ required=True,
+ error_messages={
+ 'required': 'Password Confirm field required.'},
+ label='Re-enter Password'
+ )
+
+ def clean_first_name(self):
+ return self.cleaned_data["first_name"].title()
+
+ def clean_email(self):
+ return self.cleaned_data["email"].lower()
+
+ def clean_last_name(self):
+ return self.cleaned_data["last_name"].title()
+
+
class UserLoginForm(forms.Form):
username = forms.CharField(
- widget=forms.TextInput(attrs={'class': 'form-inline', 'placeholder': 'Username'}),
- label='User Name'
- )
+ widget=forms.TextInput(
+ attrs={'class': 'form-inline', 'placeholder': 'Username'}),
+ label='User Name'
+ )
password = forms.CharField(
- widget=forms.PasswordInput(attrs={'class': 'form-inline', 'placeholder': 'Password'}),
- label='Password'
- )
-
-
+ widget=forms.PasswordInput(
+ attrs={'class': 'form-inline', 'placeholder': 'Password'}),
+ label='Password'
+ ) \ No newline at end of file
diff --git a/website/migrations/0002_proposal_open_to_share.py b/website/migrations/0002_proposal_open_to_share.py
new file mode 100644
index 0000000..4d3002e
--- /dev/null
+++ b/website/migrations/0002_proposal_open_to_share.py
@@ -0,0 +1,18 @@
+# Generated by Django 2.1 on 2018-08-28 05:33
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('website', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='proposal',
+ name='open_to_share',
+ field=models.CharField(default=1, max_length=2),
+ ),
+ ]
diff --git a/website/models.py b/website/models.py
index 4f9aa68..b73446b 100644
--- a/website/models.py
+++ b/website/models.py
@@ -5,35 +5,40 @@ from social.apps.django_app.default.models import UserSocialAuth
from nccps2018 import settings
import os
+
def get_document_dir(instance, filename):
# ename, eext = instance.user.email.split("@")
fname, fext = os.path.splitext(filename)
- #print "----------------->",instance.user
+ # print "----------------->",instance.user
return '%s/attachment/%s/%s.%s' % (instance.user, instance.proposal_type, fname+'_'+str(instance.user), fext)
+
class Proposal(models.Model):
- user = models.ForeignKey(User,on_delete=models.CASCADE,)
+ user = models.ForeignKey(User, on_delete=models.CASCADE,)
about_me = models.TextField(max_length=500)
email = models.CharField(max_length=128)
- phone = models.CharField(max_length = 20)
+ phone = models.CharField(max_length=20)
title = models.CharField(max_length=250)
abstract = models.TextField(max_length=700)
prerequisite = models.CharField(max_length=750)
- duration = models.CharField(max_length = 100)
+ duration = models.CharField(max_length=100)
attachment = models.FileField(upload_to=get_document_dir)
date_created = models.DateTimeField(auto_now_add=True)
date_modified = models.DateTimeField(auto_now=True)
- status = models.CharField(max_length = 100, default='Pending', editable=True)
- proposal_type = models.CharField(max_length = 100)
- tags = models.CharField(max_length = 250)
+ status = models.CharField(max_length=100, default='Pending', editable=True)
+ proposal_type = models.CharField(max_length=100)
+ tags = models.CharField(max_length=250)
+ open_to_share = models.CharField(max_length=2, default=1)
+
class Ratings(models.Model):
- proposal = models.ForeignKey(Proposal,on_delete=models.CASCADE,)
- user = models.ForeignKey(User,on_delete=models.CASCADE,)
+ proposal = models.ForeignKey(Proposal, on_delete=models.CASCADE,)
+ user = models.ForeignKey(User, on_delete=models.CASCADE,)
rating = models.CharField(max_length=700)
-
+
+
class Comments(models.Model):
- proposal = models.ForeignKey(Proposal,on_delete=models.CASCADE,)
- user = models.ForeignKey(User,on_delete=models.CASCADE,)
+ proposal = models.ForeignKey(Proposal, on_delete=models.CASCADE,)
+ user = models.ForeignKey(User, on_delete=models.CASCADE,)
comment = models.CharField(max_length=700)
- # rate = models.CharField(max_length =100)
+ # rate = models.CharField(max_length =100) \ No newline at end of file
diff --git a/website/urls.py b/website/urls.py
index 582f905..8568004 100644
--- a/website/urls.py
+++ b/website/urls.py
@@ -1,13 +1,42 @@
-from django.urls import path,include
+from django.urls import path, include, re_path
from . import views
+app_name = 'website'
urlpatterns = [
- path('', views.index, name='index'),
- path('proposal', views.proposal, name='proposal'),
+ #path('', views.index, name='index'),
+ re_path(r'^$', views.index, name='index'),
+ #path('proposal', views.proposal, name='proposal'),
#path('login', views.login, name='login'),
- path('accounts/', include('django.contrib.auth.urls')),
- path('proposal/view', views.view_abstracts, name='view_abstracts'),
- path('proposal/submitcfp', views.submitcfp, name='submitcfp'),
+ #path('accounts/', include('django.contrib.auth.urls')),
+ #re_path(r'^', include('django.contrib.auth.urls')),
+ #path('proposal/view', views.view_abstracts, name='view_abstracts'),
+ #path('proposal/submitcfp', views.submitcfp, name='submitcfp'),
#path('accounts/register', views.userregister, name='userregister'),
-]
+
+
+ re_path(r'^cfp/$', views.cfp, name='cfp'),
+ re_path(r'^submit-cfp/$', views.submitcfp, name='submitcfp'),
+ re_path(r'^submit-cfw/$', views.submitcfw, name='submitcfw'),
+ #url(r'^submit-cfp/$', 'website.views.cfp', name='home'),
+ #url(r'^submit-cfw/$', 'website.views.home', name='home'),
+ re_path(r'^accounts/register/$', views.userregister, name='userregister'),
+ re_path(r'^accounts/login/$', views.cfp, name='cfp'),
+ re_path(r'^gallery/$', views.gallery, name='gallery'),
+ # url(r'^view-abstracts/$', 'website.views.view_abstracts', name='view_abstracts'),
+ re_path(r'^view-abstracts/$', views.view_abstracts, name='view_abstracts'),
+ re_path(r'^abstract-details/(?P<proposal_id>\d+)$',
+ views.abstract_details, name='abstract_details'),
+ re_path(r'^edit-proposal/(?P<proposal_id>\d+)$',
+ views.edit_proposal, name='edit_proposal'),
+ re_path(r'^view-abstracts/status_change/$',
+ views.status_change, name='status_change'),
+ re_path(r'^comment-abstract/(?P<proposal_id>\d+)$',
+ views.comment_abstract, name='comment_abstract'),
+ re_path(r'^comment-abstract/status/(?P<proposal_id>\d+)$',
+ views.status, name='status'),
+ re_path(r'^comment-abstract/rate/(?P<proposal_id>\d+)$',
+ views.rate_proposal, name='rate_proposal'),
+ re_path(r'^process-contact-form/(?P<next_url>\d+)',
+ views.contact_us, name='contact_us'),
+] \ No newline at end of file
diff --git a/website/views.py b/website/views.py
index 71f57be..f665868 100644
--- a/website/views.py
+++ b/website/views.py
@@ -2,16 +2,23 @@
from django.http import HttpResponse
from django.shortcuts import render
-from django.shortcuts import render_to_response
+from django.shortcuts import render_to_response, render
from django.template import loader
from django.template import RequestContext
from django.contrib.auth.forms import UserCreationForm
-from django.views.decorators.csrf import csrf_exempt
+from django.views.decorators.csrf import csrf_exempt, csrf_protect
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from website.models import Proposal, Comments, Ratings
-from website.forms import ProposalForm
-#UserRegisterForm, UserLoginForm, WorkshopForm, ContactForm
+
+from website.forms import ProposalForm, UserRegisterForm, UserLoginForm, WorkshopForm # ,ContactForm
+from website.models import Proposal, Comments, Ratings
+from social.apps.django_app.default.models import UserSocialAuth
+from django.contrib.auth import authenticate, login, logout
+
+from django.core.mail import EmailMultiAlternatives
+import os
+from nccps2018.config import *
def index(request):
@@ -19,20 +26,54 @@ def index(request):
template = loader.get_template('index.html')
return HttpResponse(template.render(context, request))
+# def proposal(request):
+# context = {}
+# template = loader.get_template('proposal.html')
+# return HttpResponse(template.render(context, request))
+
+
+@csrf_protect
def proposal(request):
- context = {}
- template = loader.get_template('proposal.html')
- return HttpResponse(template.render(context, request))
+ if request.method == "POST":
+ context = {}
+ username = request.POST.get('username', None)
+ password = request.POST.get('password', None)
+ user = authenticate(username=username, password=password)
+ if user is not None:
+ login(request, user)
+ if 'next' in request.GET:
+ next = request.GET.get('next', None)
+ return HttpResponseRedirect(next)
+ proposals = Proposal.objects.filter(user=request.user).count()
+ context['user'] = user
+ context['proposals'] = proposals
+ template = loader.get_template('proposal.html')
+ return HttpResponse(template.render(context, request))
+ else:
+ context['invalid'] = True
+ context['form'] = UserLoginForm
+ context['user'] = user
+ template = loader.get_template('proposal.html')
+ return HttpResponse(template.render(context, request))
+ else:
+ form = UserLoginForm()
+ context = {'request': request,
+ 'user': request.user,
+ 'form': form,
+ }
+ template = loader.get_template('proposal.html')
+ return HttpResponse(template.render(context, request))
-## User Register
+# User Register
+@csrf_protect
def userregister(request):
context = {}
registered_emails = []
users = User.objects.all()
for user in users:
registered_emails.append(user.email)
- if request.user.is_anonymous():
+ if request.user.is_anonymous:
if request.method == 'POST':
form = UserRegisterForm(request.POST)
if form.is_valid():
@@ -47,27 +88,34 @@ def userregister(request):
form = UserLoginForm()
context['form'] = form
context['user'] = request.user
- return render_to_response('cfp.html', context)
+ template = loader.get_template('cfp.html')
+ return HttpResponse(template.render(context, request))
else:
context['form'] = form
- return render_to_response('user-register.html', context)
+ template = loader.get_template('user-register.html')
+ return HttpResponse(template.render(context, request))
else:
form = UserRegisterForm()
context['form'] = form
- return render_to_response('user-register.html', context)
+ template = loader.get_template('user-register.html')
+ return HttpResponse(template.render(context, request))
else:
context['user'] = request.user
- return render_to_response('cfp.html', context)
+ template = loader.get_template('user-register.html')
+ return HttpResponse(template.render(context, request))
+
+# View Proposal/Abstract
+
-## View Proposal/Abstract
@login_required
+@csrf_protect
def view_abstracts(request):
user = request.user
context = {}
- count_list =[]
+ count_list = []
if request.user.is_authenticated:
- if user.is_superuser :
+ if user.is_superuser:
proposals = Proposal.objects.all().order_by('status')
ratings = Ratings.objects.all()
context['ratings'] = ratings
@@ -75,18 +123,19 @@ def view_abstracts(request):
context['user'] = user
return render(request, 'view-proposals.html', context)
elif user is not None:
- if Proposal.objects.filter(user = user).exists :
- proposals = Proposal.objects.filter(user = user).order_by('status')
- proposal_list= [pro.proposal_type for pro in proposals]
+ if Proposal.objects.filter(user=user).exists:
+ proposals = Proposal.objects.filter(
+ user=user).order_by('status')
+ proposal_list = [pro.proposal_type for pro in proposals]
if 'WORKSHOP' in proposal_list and 'ABSTRACT' in proposal_list:
proposal_type = 'BOTH'
elif 'WORKSHOP' in proposal_list and 'ABSTRACT' not in proposal_list:
proposal_type = 'WORKSHOP'
else:
- proposal_type = 'ABSTRACT'
+ proposal_type = 'ABSTRACT'
context['counts'] = count_list
- context['proposals'] =proposals
+ context['proposals'] = proposals
context['type'] = proposal_type
context['user'] = user
return render(request, 'view-proposals.html', context)
@@ -95,6 +144,8 @@ def view_abstracts(request):
else:
return render(request, 'cfp.html', context)
+
+@csrf_protect
def cfp(request):
if request.method == "POST":
context = {}
@@ -106,7 +157,7 @@ def cfp(request):
if 'next' in request.GET:
next = request.GET.get('next', None)
return HttpResponseRedirect(next)
- proposals = Proposal.objects.filter(user = request.user).count()
+ proposals = Proposal.objects.filter(user=request.user).count()
context['user'] = user
context['proposals'] = proposals
return render_to_response('cfp.html', context)
@@ -118,12 +169,14 @@ def cfp(request):
else:
form = UserLoginForm()
context = {'request': request,
- 'user': request.user,
- }
+ 'user': request.user,
+ 'form': form,
+ }
template = loader.get_template('cfp.html')
return HttpResponse(template.render(context, request))
+@csrf_protect
@login_required
def submitcfp(request):
context = {}
@@ -132,7 +185,8 @@ def submitcfp(request):
django_user = User.objects.get(username=social_user)
context['user'] = django_user
- proposals_a = Proposal.objects.filter(user = request.user, proposal_type = 'ABSTRACT').count()
+ proposals_a = Proposal.objects.filter(
+ user=request.user, proposal_type='ABSTRACT').count()
if request.method == 'POST':
form = ProposalForm(request.POST, request.FILES)
if form.is_valid():
@@ -141,38 +195,717 @@ def submitcfp(request):
data.email = social_user.email
data.save()
context['proposal_submit'] = True
- sender_name = "SciPy India 2017"
+ sender_name = "SciPy India 2018"
sender_email = TO_EMAIL
- subject = "SciPy India 2017 – Talk Proposal Submission Acknowledgment"
+ subject = "SciPy India 2018 – Talk Proposal Submission Acknowledgment"
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.
+ Thank you for showing interest & submitting a talk proposal at SciPy India 2018 conference for the talk titled <b>“{1}”</b>. Reviewal of the proposals will start once the CFP closes.
<br><br>You will be notified regarding comments/selection/rejection of your talk via email.
Visit this {2} link to view status of your submission.
- <br>Thank You ! <br><br>Regards,<br>SciPy India 2017,<br>FOSSEE - IIT Bombay.
+ <br>Thank You ! <br><br>Regards,<br>SciPy India 2018,<br>FOSSEE - IIT Bombay.
""".format(
- social_user.first_name,
- request.POST.get('title', None),
- 'http://scipy.in/2017/view-abstracts/', )
+ social_user.first_name,
+ request.POST.get('title', None),
+ 'http://scipy.in/2018/view-abstracts/',)
email = EmailMultiAlternatives(
- subject,'',
- sender_email, to,
- headers={"Content-type":"text/html;charset=iso-8859-1"}
+ subject, '',
+ sender_email, to,
+ headers={"Content-type": "text/html;charset=iso-8859-1"}
)
email.attach_alternative(message, "text/html")
email.send(fail_silently=True)
return render_to_response('cfp.html', context)
else:
- context['proposal_form'] = form
+ context['proposal_form'] = form
context['proposals_a'] = proposals_a
template = loader.get_template('submit-cfp.html')
return HttpResponse(template.render(context, request))
else:
form = ProposalForm()
- context['proposals_a'] = proposals_a
- return render(request, 'submit-cfp.html', {'form': form})
+ context['proposals_a'] = proposals_a
+ return render(request, 'submit-cfp.html', {'proposal_form': form})
else:
context['login_required'] = True
return render_to_response('cfp.html', context)
+
+@csrf_protect
+@login_required
+def submitcfw(request):
+ context = {}
+ if request.user.is_authenticated:
+ social_user = request.user
+ # context.update(csrf(request))
+ django_user = User.objects.get(username=social_user)
+ context['user'] = django_user
+ proposals_w = Proposal.objects.filter(
+ user=request.user, proposal_type='WORKSHOP').count()
+ if request.method == 'POST':
+ form = WorkshopForm(request.POST, request.FILES)
+ 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 2018"
+ sender_email = TO_EMAIL
+ subject = "SciPy India 2018 – Workshop Proposal Submission Acknowledgment"
+ to = (social_user.email, TO_EMAIL)
+ message = """
+ Dear {0}, <br><br>
+ Thank you for showing interest & submitting a workshop proposal at SciPy India 2018 conference for the workshop titled <b>“{1}”</b>. Reviewal of the proposals will start once the CFP closes.
+ <br><br>You will be notified regarding comments/selection/rejection of your workshop via email.
+ Visit this {2} link to view status of your submission.
+ <br>Thank You ! <br><br>Regards,<br>SciPy India 2018,<br>FOSSEE - IIT Bombay.
+ """.format(
+ social_user.first_name,
+ request.POST.get('title', None),
+ 'http://scipy.in/2018/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)
+ return render_to_response('cfp.html', context)
+ else:
+ context['proposal_form'] = form
+ context['proposals_w'] = proposals_w
+ template = loader.get_template('submit-cfw.html')
+ return HttpResponse(template.render(context, request))
+
+ else:
+ form = WorkshopForm()
+ context['proposal_form'] = form
+ context['proposals_w'] = proposals_w
+ template = loader.get_template('submit-cfw.html')
+ return HttpResponse(template.render(context, request))
+ else:
+ context['login_required'] = True
+ template = loader.get_template('cfp.html')
+ return HttpResponse(template.render(context, request))
+
+
+@csrf_exempt
+def gallery(request):
+ return render(request, 'gallery.html')
+
+
+@login_required
+def edit_proposal(request, proposal_id=None):
+ user = request.user
+ context = {}
+ if user.is_authenticated:
+ try:
+ proposal = Proposal.objects.get(id=proposal_id)
+ if proposal.status == 'Edit':
+ if proposal.proposal_type == 'ABSTRACT':
+ form = ProposalForm(instance=proposal)
+ else:
+ form = WorkshopForm(instance=proposal)
+ else:
+ return render(request, 'cfp.html')
+ if request.method == 'POST':
+ if proposal.status == 'Edit':
+ if proposal.proposal_type == 'ABSTRACT':
+ form = ProposalForm(
+ request.POST, request.FILES, instance=proposal)
+ else:
+ form = WorkshopForm(
+ request.POST, request.FILES, instance=proposal)
+ else:
+ return render(request, 'cfp.html')
+ if form.is_valid():
+ data = form.save(commit=False)
+ data.user = user
+ proposal.status = 'Resubmitted'
+ data.save()
+ context.update(csrf(request))
+ proposals = Proposal.objects.filter(
+ user=user).order_by('status')
+ context['proposals'] = proposals
+ return render(request, 'view-proposals.html', context)
+ else:
+ context['user'] = user
+ context['form'] = form
+ context['proposal'] = proposal
+ return render(request, 'edit-proposal.html', context)
+ context['user'] = user
+ context['form'] = form
+ context['proposal'] = proposal
+ except:
+ render(request, 'cfp.html')
+ return render(request, 'edit-proposal.html', context)
+
+
+@login_required
+def abstract_details(request, proposal_id=None):
+ user = request.user
+ context = {}
+ if user.is_authenticated:
+ if user.is_superuser:
+ proposals = Proposal.objects.all()
+ context['proposals'] = proposals
+ context['user'] = user
+ return render(request, 'cfp.html', context)
+ elif user is not None:
+ try:
+ proposal = Proposal.objects.get(id=proposal_id)
+ if proposal.user == user:
+ try:
+ url = '/2018'+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)
+ else:
+ return render(request, 'cfp.html', context)
+
+
+@login_required
+def rate_proposal(request, proposal_id=None):
+ user = request.user
+ context = {}
+ if user.is_authenticated:
+ proposal = Proposal.objects.get(id=proposal_id)
+ if request.method == 'POST':
+ ratings = Ratings.objects.filter(
+ proposal_id=proposal_id, user_id=user.id)
+ if ratings:
+ for rate in ratings:
+ rate.rating = request.POST.get('rating', None)
+ rate.save()
+ else:
+ newrate = Ratings()
+ newrate.rating = request.POST.get('rating', None)
+ newrate.user = user
+ newrate.proposal = proposal
+ newrate.save()
+ rates = Ratings.objects.filter(proposal_id=proposal_id)
+ comments = Comments.objects.filter(proposal=proposal)
+ context['comments'] = comments
+ context['proposal'] = proposal
+ context['rates'] = rates
+ # context.update(csrf(request))
+ return render(request, 'comment-abstract.html', context)
+ else:
+ rates = Ratings.objects.filter(proposal=proposal)
+ comments = Comments.objects.filter(proposal=proposal)
+ context['comments'] = comments
+ context['proposal'] = proposal
+ context['rates'] = rates
+ # context.update(csrf(request))
+ return render(request, 'comment-abstract.html', context)
+ else:
+ return render(request, 'comment-abstract.html', context)
+
+
+@login_required
+def comment_abstract(request, proposal_id=None):
+ user = request.user
+ context = {}
+ if user.is_authenticated:
+ if user.is_superuser:
+ try:
+ proposal = Proposal.objects.get(id=proposal_id)
+ try:
+ url = '/2018'+str(proposal.attachment.url)
+ context['url'] = url
+ except:
+ pass
+ if request.method == 'POST':
+ comment = Comments()
+ comment.comment = request.POST.get('comment', None)
+ comment.user = user
+ comment.proposal = proposal
+ comment.save()
+ comments = Comments.objects.filter(proposal=proposal)
+ sender_name = "SciPy India 2018"
+ sender_email = TO_EMAIL
+ to = (proposal.user.email, TO_EMAIL)
+ if proposal.proposal_type == 'ABSTRACT':
+ subject = "SciPy India 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>
+ Thank You ! <br><br>Regards,<br>SciPy India 2018,<br>FOSSEE - IIT Bombay.
+ """.format(
+ proposal.user.first_name,
+ proposal.title,
+ 'http://scipy.in/2018/abstract-details/' +
+ str(proposal.id),
+ )
+ elif proposal.proposal_type == 'WORKSHOP':
+ subject = "SciPy India 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>SciPy India 2018,<br>FOSSEE - IIT Bombay.
+ """.format(
+ proposal.user.first_name,
+ proposal.title,
+ 'http://scipy.in/2018/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))
+ template = loader.get_template('comment-abstract.html')
+ return HttpResponse(template.render(context, request))
+ 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))
+ template = loader.get_template('comment-abstract.html')
+ return HttpResponse(template.render(context, request))
+ except:
+ template = loader.get_template('cfp.html')
+ return HttpResponse(template.render(context, request))
+ else:
+ template = loader.get_template('cfp.html')
+ return HttpResponse(template.render(context, request))
+ else:
+ template = loader.get_template('cfp.html')
+ return HttpResponse(template.render(context, request))
+
+
+@login_required
+def status(request, proposal_id=None):
+ user = request.user
+ context = {}
+ if user.is_authenticated:
+ if user.is_superuser:
+ proposal = Proposal.objects.get(id=proposal_id)
+ if 'accept' in request.POST:
+ proposal.status = "Accepted"
+ proposal.save()
+ sender_name = "SciPy India 2018"
+ sender_email = TO_EMAIL
+ to = (proposal.user.email, TO_EMAIL)
+ if proposal.proposal_type == 'ABSTRACT':
+ subject = "SciPy India 2018 - Talk Proposal Accepted"
+ message = """Dear """+proposal.user.first_name+""",
+ Thank you for your excellent submissions! This year we received many really good submissions. Due the number and quality of the talks this year we have decided to give 20 minute slots to all the accepted talks. So even though you may have submitted a 30 minute one, we are sorry you will only have 20 minutes. Of these 20 minutes please plan to do a 15 minute talk (we will strive hard to keep to time), and keep 5 minutes for Q&A and transfer. We will have the next speaker get ready during your Q&A session in order to not waste time.
+ Pardon the unsolicited advice but it is important that you plan your presentations carefully. 15 minutes is a good amount of time to communicate your central idea. Most really good TED talks finish in 15 minutes. Keep your talk focussed and please do rehearse your talk and slides to make sure it flows well. If you need help with this, the program chairs can try to help you by giving you some early feedback on your slides. Just upload your slides before 26th on the same submission interface and we will go over it once. For anything submitted after 26th we may not have time to comment on but will try to give you feedback. Please also keep handy a PDF version of your talk in case your own laptops have a problem.
+ Please confirm your participation. The schedule will be put up online by end of day. We look forward to hearing your talk.
+ \n\nYou will be notified regarding instructions of your talk via email.\n\nThank You ! \n\nRegards,\nSciPy India 2018,\nFOSSEE - IIT Bombay"""
+ elif proposal.proposal_type == 'WORKSHOP':
+ subject = "SciPy India 2018 - Workshop Proposal Accepted"
+ message = """Dear """+proposal.user.first_name+""",
+ Thank you for your excellent submissions! We are pleased to accept your workshop. Due to the large number of submissions we have decided to accept 8 workshops and give all the selected workshops 2 hours each. Please plan for 1 hour and 55 minutes in order to give the participants a 10 minute break between workshops for tea.
+ The tentative schedule will be put up on the website shortly. Please do provide detailed instructions for the participants (and the organizers if they need to do something for you) in your reply. Please also confirm your participation.
+ We strongly suggest that you try to plan your workshops carefully and focus on doing things hands-on and not do excessive amounts of theory. Try to give your participants a decent overview so they can pick up additional details on their own. It helps to pick one or two overarching problems you plan to solve and work your way through the solution of those.
+ Installation is often a problem, so please make sure your instructions are simple and easy to follow. If you wish, we could allow some time the previous day for installation help. Let us know about this. Also, do not waste too much time on installation during your workshop.
+ \n\nYou will be notified regarding instructions of your talk via email.\n\nThank You ! \n\nRegards,\nSciPy India 2018,\nFOSSEE - IIT Bombay"""
+ #send_mail(subject, message, sender_email, to)
+ # context.update(csrf(request))
+ elif 'reject' in request.POST:
+ proposal.status = "Rejected"
+ proposal.save()
+ sender_name = "SciPy India 2018"
+ sender_email = TO_EMAIL
+ to = (proposal.user.email, TO_EMAIL, )
+ if proposal.proposal_type == 'ABSTRACT':
+ subject = "SciPy India 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,\nSciPy India 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
+ # SciPy India Program chairs"""
+
+ elif proposal.proposal_type == 'WORKSHOP':
+ subject = "SciPy India 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,\nSciPy India 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 SciPy toolstack the application was not entirely in the domain of the attendees we typically have at SciPy. 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.
+
+ # We look forward to seeing you at the conference and to your continued interest and participation.
+ # \n\nRegards,\n\nSciPy India Program chairs"""
+
+ #send_mail(subject, message, sender_email, to)
+ # context.update(csrf(request))
+ elif 'resubmit' in request.POST:
+ to = (proposal.user.email, TO_EMAIL)
+ sender_name = "SciPy India 2018"
+ sender_email = TO_EMAIL
+ if proposal.proposal_type == 'ABSTRACT':
+ subject = "SciPy India 2018 - Talk Proposal Resumbmission"
+ message = """
+ Dear {0}, <br><br>
+ Thank you for your excellent submissions! Your talk has been accepted! This year we received many really good submissions. Due to the number and quality of the talks this year we have decided to give 20 minute slots to all the accepted talks. So even though you may have submitted a 30 minute one, we are sorry you will only have 20 minutes. Of these 20 minutes please plan to do a 15 minute talk (we will strive hard to keep to time), and keep 5 minutes for Q&A and transfer. We will have the next speaker get ready during your Q&A session in order to not waste time.
+ Pardon the unsolicited advice but it is important that you plan your presentations carefully. 15 minutes is a good amount of time to communicate your central idea. Most really good TED talks finish in 15 minutes. Keep your talk focussed and please do rehearse your talk and slides to make sure it flows well.
+ We (the program chairs) are happy to help you by giving you some early feedback on your slides. Just upload your slides before 26th and we will go over it once. You may upload your slides by clicking on edit when you login to the site. You may also modify your abstract if you want to improve it. For anything submitted after 26th we may not have time to comment but will try to give you feedback. Please also keep handy a PDF version of your talk in case your own laptops have a problem.
+ Please confirm your participation via return email. The tentative schedule will be put up online by end of day. We look forward to hearing your talk.
+
+ """.format(
+ proposal.user.first_name,
+ proposal.title,
+ 'https://scipy.in/2018/view-abstracts/'
+ )
+ elif proposal.proposal_type == 'WORKSHOP':
+ subject = "SciPy India 2018 - Workshop Proposal Resubmission"
+ message = """
+ Thank you for showing interest & submitting a workshop proposal at SciPy India 2018 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 2018,<br>FOSSEE - IIT Bombay.
+ """.format(
+ proposal.user.first_name,
+ proposal.title,
+ 'https://scipy.in/2018/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))
+ else:
+ return render(request, 'cfp.html')
+ else:
+ return render(request, 'cfp.html')
+ proposals = Proposal.objects.all().order_by('status')
+ context['proposals'] = proposals
+ context['user'] = user
+ return render(request, 'view-proposals.html', context)
+
+
+@login_required
+def status_change(request):
+ user = request.user
+ context = {}
+ if user.is_authenticated:
+ if user.is_superuser:
+ if 'delete' in request.POST:
+ delete_proposal = request.POST.getlist('delete_proposal')
+ for proposal_id in delete_proposal:
+ proposal = Proposal.objects.get(id=proposal_id)
+ proposal.delete()
+ # context.update(csrf(request))
+ proposals = Proposal.objects.all()
+ context['proposals'] = proposals
+ context['user'] = user
+ template = loader.get_template('view-proposals.html')
+ return HttpResponse(template.render(context, request))
+ elif 'dump' in request.POST:
+ delete_proposal = request.POST.getlist('delete_proposal')
+ blank = False
+ if delete_proposal == []:
+ blank = True
+ try:
+ if blank == False:
+ response = HttpResponse(content_type='text/csv')
+ response['Content-Disposition'] = 'attachment; filename="Proposals.csv"'
+ writer = csv.writer(response)
+ header = [
+ 'name',
+ 'username',
+ 'email',
+ 'about_me',
+ 'phone',
+ 'title',
+ 'abstract',
+ 'prerequisite',
+ 'duration',
+ 'attachment',
+ 'date_created',
+ 'status',
+ 'proposal_type',
+ 'tags',
+ ]
+ writer.writerow(header)
+ for proposal_id in delete_proposal:
+ proposal = Proposal.objects.get(id=proposal_id)
+ row = [
+ '{0} {1}'.format(
+ proposal.user.first_name, proposal.user.last_name),
+ proposal.user.username,
+ proposal.user.email,
+ proposal.about_me,
+ proposal.phone,
+ proposal.title,
+ proposal.abstract,
+ proposal.prerequisite,
+ proposal.duration,
+ proposal.attachment,
+ proposal.date_created,
+ proposal.status,
+ proposal.proposal_type,
+ proposal.tags,
+ ]
+ writer.writerow(row)
+ return response
+ else:
+ proposals = Proposal.objects.all()
+ context['proposals'] = proposals
+ context['user'] = user
+ template = loader.get_template('view-proposals.html')
+ return HttpResponse(template.render(context, request))
+ except:
+ proposals = Proposal.objects.all()
+ context['proposals'] = proposals
+ context['user'] = user
+ template = loader.get_template('view-proposals.html')
+ return HttpResponse(template.render(context, request))
+ 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 2018"
+ sender_email = TO_EMAIL
+ to = (proposal.user.email, TO_EMAIL)
+ if proposal.proposal_type == 'ABSTRACT':
+ subject = "SciPy India 2018 - Talk Proposal Accepted"
+ message = """Dear """+proposal.user.first_name+""",
+ Thank you for your excellent submissions! This year we received many really good submissions. Due the number and quality of the talks this year we have decided to give 20 minute slots to all the accepted talks. So even though you may have submitted a 30 minute one, we are sorry you will only have 20 minutes. Of these 20 minutes please plan to do a 15 minute talk (we will strive hard to keep to time), and keep 5 minutes for Q&A and transfer. We will have the next speaker get ready during your Q&A session in order to not waste time.
+ Pardon the unsolicited advice but it is important that you plan your presentations carefully. 15 minutes is a good amount of time to communicate your central idea. Most really good TED talks finish in 15 minutes. Keep your talk focussed and please do rehearse your talk and slides to make sure it flows well. If you need help with this, the program chairs can try to help you by giving you some early feedback on your slides. Just upload your slides before 26th on the same submission interface and we will go over it once. For anything submitted after 26th we may not have time to comment on but will try to give you feedback. Please also keep handy a PDF version of your talk in case your own laptops have a problem.
+ Please confirm your participation. The schedule will be put up online by end of day. We look forward to hearing your talk.
+ \n\nYou will be notified regarding instructions of your talk via email.\n\nThank You ! \n\nRegards,\nSciPy India 2018,\nFOSSEE - IIT Bombay"""
+ elif proposal.proposal_type == 'WORKSHOP':
+ subject = "SciPy India 2018 - Workshop Proposal Accepted"
+ message = """Dear """+proposal.user.first_name+""",
+ Thank you for your excellent submissions! We are pleased to accept your workshop. Due to the large number of submissions, we have decided to accept 8 workshops and give all the selected workshops 2 hours each. Please plan for 1 hour and 55 minutes in order to give the participants a 10 minute break between workshops for tea.
+
+The tentative schedule will be put up on the website shortly. Please confirm your participation and do provide detailed instructions for the participants (and the organizers if they need to do something for you) by replying to this email. These instructions will be made available on the conference website. Installation is often a problem, so please make sure your instructions are simple and easy to follow. If you wish, we could allow some time on the previous day for installation help. Let us know about this. Also, do not waste too much time on installation during your workshop.
+
+We strongly suggest that you try to plan your workshops carefully and focus on doing things hands-on and not do excessive amounts of theory. Try to give your participants a decent overview so they can pick up additional details on their own. It helps to pick one or two overarching problems you plan to solve and work your way through the solution of those.
+\n\nThank You ! \n\nRegards,\nSciPy India 2018,\nFOSSEE - IIT Bombay"""
+ #send_mail(subject, message, sender_email, to)
+ # context.update(csrf(request))
+ proposals = Proposal.objects.all()
+ context['proposals'] = proposals
+ context['user'] = user
+ template = loader.get_template('view-proposals.html')
+ return HttpResponse(template.render(context, request))
+ 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 2018"
+ sender_email = TO_EMAIL
+ to = (proposal.user.email, TO_EMAIL)
+ if proposal.proposal_type == 'ABSTRACT':
+ subject = "SciPy India 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,\nSciPy India 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\nSciPy India Program chairs"""
+ elif proposal.proposal_type == 'WORKSHOP':
+ subject = "SciPy India 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,\nSciPy India 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 SciPy toolstack the application was not entirely in the domain of the attendees we typically have at SciPy. 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.
+
+ # We look forward to seeing you at the conference and to your continued interest and participation.
+ # \n\nRegards,\n\nSciPy India Program chairs"""
+ #send_mail(subject, message, sender_email, to)
+ # context.update(csrf(request))
+ proposals = Proposal.objects.all()
+ context['proposals'] = proposals
+ context['user'] = user
+ template = loader.get_template('view-proposals.html')
+ return HttpResponse(template.render(context, request))
+ 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)
+ sender_name = "SciPy India 2018"
+ sender_email = TO_EMAIL
+ to = (proposal.user.email, TO_EMAIL)
+ if proposal.proposal_type == 'ABSTRACT':
+ subject = "SciPy India 2018 - Talk Proposal Acceptance"
+ message = """
+ Dear {0}, <br><br>
+ Thank you for your excellent submissions! Your talk has been accepted! This year, we have received many really good submissions. Due to the number and quality of the talks this year we have decided to give 20 minute slots to all the accepted talks. So even though you may have submitted a 30 minute one, we are sorry you will only have 20 minutes. Of these 20 minutes, please plan to do a 15 minute talk (we will strive hard to keep to time), and keep 5 minutes for Q&A and transfer. We will have the next speaker get ready during your Q&A session in order to not waste time.
+
+Pardon the unsolicited advice but it is important that you plan your presentations carefully. 15 minutes is a good amount of time to communicate your central idea. Most really good TED talks finish in 15 minutes. Keep your talk focussed and please do rehearse your talk and slides to make sure it flows well.
+
+We (the program chairs) are happy to help you by giving you some early feedback on your slides. Just upload your slides before 26th and we will go over it once. You may upload your slides by clicking on edit when you login to the site. You may also modify your abstract if you want to improve it. For anything submitted after 26th we may not have time to comment but will try to give you feedback. Please also keep handy a PDF version of your talk in case your own laptops have a problem.
+
+Please confirm your participation via return email. The tentative schedule will be put up online by end of day. We look forward to hearing your talk.
+Thank You ! <br><br>Regards,<br>SciPy India 2018,<br>FOSSEE - IIT Bombay.
+ """.format(
+ proposal.user.first_name,
+ proposal.title,
+ 'https://scipy.in/2018/view-abstracts/'
+ )
+ elif proposal.proposal_type == 'WORKSHOP':
+ subject = "SciPy India 2018 - Workshop Proposal Resubmission"
+ message = """
+ Thank you for showing interest & submitting a workshop proposal at SciPy India 2018 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 2018,<br>FOSSEE - IIT Bombay.
+ """.format(
+ proposal.user.first_name,
+ proposal.title,
+ 'https://scipy.in/2018/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()
+ context['proposals'] = proposals
+ context['user'] = user
+ template = loader.get_template('view-proposals.html')
+ return HttpResponse(template.render(context, request))
+ else:
+ proposals = Proposal.objects.all()
+ context['proposals'] = proposals
+ context['user'] = user
+ template = loader.get_template('view-proposals.html')
+ return HttpResponse(template.render(context, request))
+ else:
+ template = loader.get_template('cfp.html')
+ return HttpResponse(template.render(context, request))
+ else:
+ template = loader.get_template('view-proposals.html')
+ return HttpResponse(template.render(context, request))
+
+
+@login_required
+def edit_proposal(request, proposal_id=None):
+ user = request.user
+ context = {}
+ if user.is_authenticated:
+ try:
+ proposal = Proposal.objects.get(id=proposal_id)
+ if proposal.status == 'Edit':
+ if proposal.proposal_type == 'ABSTRACT':
+ form = ProposalForm(instance=proposal)
+ else:
+ form = WorkshopForm(instance=proposal)
+ else:
+ return render(request, 'cfp.html')
+ if request.method == 'POST':
+ if proposal.status == 'Edit':
+ if proposal.proposal_type == 'ABSTRACT':
+ form = ProposalForm(
+ request.POST, request.FILES, instance=proposal)
+ else:
+ form = WorkshopForm(
+ request.POST, request.FILES, instance=proposal)
+ else:
+ return render(request, 'cfp.html')
+ if form.is_valid():
+ data = form.save(commit=False)
+ data.user = user
+ proposal.status = 'Resubmitted'
+ data.save()
+ context.update(csrf(request))
+ proposals = Proposal.objects.filter(
+ user=user).order_by('status')
+ context['proposals'] = proposals
+ return render(request, 'view-abstracts.html', context)
+ else:
+ context['user'] = user
+ context['form'] = form
+ context['proposal'] = proposal
+ return render(request, 'edit-proposal.html', context)
+ context['user'] = user
+ context['form'] = form
+ context['proposal'] = proposal
+ except:
+ template = loader.get_template('cfp.html')
+ return HttpResponse(template.render(context, request))
+ template = loader.get_template('edit-proposal.html')
+ return HttpResponse(template.render(context, request))
+
+
+@csrf_exempt
+def contact_us(request, next_url):
+ pass
+ # user = request.user
+ # context = {}
+ # if request.method == "POST":
+ # form = ContactForm(request.POST)
+ # sender_name = request.POST['name']
+ # sender_email = request.POST['email']
+ # to = ('scipy@fossee.in',)
+ # subject = "Query from - "+sender_name
+ # message = request.POST['message']
+ # try:
+ # send_mail(subject, message, sender_email, to)
+ # context['mailsent'] = True
+ # context['user'] = user
+ # except:
+ # context['mailfailed'] = True
+ # context['user'] = user
+ # return redirect(next_url,context) \ No newline at end of file