diff options
author | Sashi20 | 2018-10-03 12:05:01 +0530 |
---|---|---|
committer | Sashi20 | 2018-10-03 12:05:01 +0530 |
commit | 808b9d8c687f873504cd1d6eec1888bb234dcffe (patch) | |
tree | 14d9d2501e9f42064d70570c3bd53baedb0777b8 | |
parent | d13ba980c9b3fbd8117f4bc21e4378c38c086453 (diff) | |
download | nccps-2018-808b9d8c687f873504cd1d6eec1888bb234dcffe.tar.gz nccps-2018-808b9d8c687f873504cd1d6eec1888bb234dcffe.tar.bz2 nccps-2018-808b9d8c687f873504cd1d6eec1888bb234dcffe.zip |
Extended paper submission date and fixed minor issues in edit proposal
-rw-r--r-- | static/website/bootstrap-css/assets/images/backgrounds/top_2.png | bin | 74986 -> 74949 bytes | |||
-rwxr-xr-x | static/website/templates/abstract-details.html | 6 | ||||
-rwxr-xr-x | static/website/templates/comment-abstract.html | 12 | ||||
-rwxr-xr-x | static/website/templates/edit-proposal.html | 4 | ||||
-rw-r--r-- | static/website/templates/proposal.html | 2 | ||||
-rw-r--r-- | static/website/templates/view-profile.html | 2 | ||||
-rwxr-xr-x | static/website/templates/view-proposals.html | 4 | ||||
-rw-r--r-- | website/views.py | 79 |
8 files changed, 76 insertions, 33 deletions
diff --git a/static/website/bootstrap-css/assets/images/backgrounds/top_2.png b/static/website/bootstrap-css/assets/images/backgrounds/top_2.png Binary files differindex 3f1897c..a18fd0e 100644 --- a/static/website/bootstrap-css/assets/images/backgrounds/top_2.png +++ b/static/website/bootstrap-css/assets/images/backgrounds/top_2.png diff --git a/static/website/templates/abstract-details.html b/static/website/templates/abstract-details.html index a1b2c2f..a583c30 100755 --- a/static/website/templates/abstract-details.html +++ b/static/website/templates/abstract-details.html @@ -5,7 +5,7 @@ <div class="container"> <p> <center> - <h2>Abstract Details</h2> + <h2>Paper Details</h2> </center> </p> <h3><span class="label label-primary">{{ proposal.user.first_name }} {{ proposal.user.last_name }}</span></h3> @@ -16,8 +16,8 @@ {% if proposal.prerequisite %} <p><b>Prerequisite: </b> {{ proposal.prerequisite |linebreaks }}</p> {% endif%} - <p><b>Duration: </b> {{ proposal.duration }} {% if proposal.proposal_type == "ABSTRACT"%} Mins {% else %}Hours {%endif%}</p> - {% if proposal.proposal_type == "ABSTRACT"%} + <p><b>Duration: </b> {{ proposal.duration }} {% if proposal.proposal_type == "PAPER"%} Mins {% else %}Hours {%endif%}</p> + {% if proposal.proposal_type == "PAPER"%} <p><b>Tags: </b> {{ proposal.tags }}</p> {% else %} <p><b>Level: </b> {{ proposal.tags }}</p> diff --git a/static/website/templates/comment-abstract.html b/static/website/templates/comment-abstract.html index f77eb3f..2695ba3 100755 --- a/static/website/templates/comment-abstract.html +++ b/static/website/templates/comment-abstract.html @@ -7,7 +7,7 @@ <div class="container"> <p> <center> - {% if proposal.proposal_type == "ABSTRACT"%} + {% if proposal.proposal_type == "PAPER"%} <h2>Abstract Details</h2> {% else %} <h2>Workshop Details</h2> @@ -18,18 +18,18 @@ <p><b>Title of the paper: </b> {{ proposal.title }}</p> <p><b>Name of the author(s):</b> {{proposal.name_of_authors}}</p> <p align="justify"><b>About the Author(s): </b> {{ proposal.about_the_authors |linebreaks }}</p> - <!--{% if proposal.proposal_type == "ABSTRACT"%} - <p align="justify"><b>Abstract:</b> + <!--{% if proposal.proposal_type == "PAPER"%} + <p align="justify"><b>Paper:</b> {% else %} <p align="justify"><b>Description:</b> {% endif %} - {{ proposal.abstract | linebreaks }} + {{ proposal.paper | linebreaks }} </p> {% if proposal.prerequisite %} <p align="justify"><b>Prerequisite: </b> {{ proposal.prerequisite| linebreaks }}</p> {% endif%} --> - <p><b>Duration: </b> {{ proposal.duration }} {% if proposal.proposal_type == "ABSTRACT"%} Mins {% else %}Hours {%endif%}</p> - {% if proposal.proposal_type == "ABSTRACT"%} + <p><b>Duration: </b> {{ proposal.duration }} {% if proposal.proposal_type == "PAPER"%} Mins {% else %}Hours {%endif%}</p> + {% if proposal.proposal_type == "PAPER"%} <p><b>Tags: </b> {{ proposal.tags }}</p> {% else %} <p><b>Level: </b> {{ proposal.tags }}</p> diff --git a/static/website/templates/edit-proposal.html b/static/website/templates/edit-proposal.html index fdcc39b..b2a141e 100755 --- a/static/website/templates/edit-proposal.html +++ b/static/website/templates/edit-proposal.html @@ -7,8 +7,8 @@ <div class="container"> <p> <center> - {% if proposal.proposal_type == "ABSTRACT" %} - <h2>Edit Abstract Proposal</h2> + {% if proposal.proposal_type == "PAPER" %} + <h2>Edit Paper Proposal</h2> {% else %} <h2>Edit Workshop Proposal</h2> {% endif %} diff --git a/static/website/templates/proposal.html b/static/website/templates/proposal.html index c7bdc77..4a34561 100644 --- a/static/website/templates/proposal.html +++ b/static/website/templates/proposal.html @@ -39,7 +39,7 @@ </h2> </span> <ul> - <li>Last date for paper submission: <b> 03/10/2018</b></li> + <li>Last date for paper submission: <b> 07/10/2018</b></li> <li>Notification of acceptance: <b>22/10/2018</b></li> <li>Last date for final paper submission: <b>02/11/2018</b></li> </ul> diff --git a/static/website/templates/view-profile.html b/static/website/templates/view-profile.html index d8fa8ab..706214c 100644 --- a/static/website/templates/view-profile.html +++ b/static/website/templates/view-profile.html @@ -47,7 +47,7 @@ </h2> </span> <ul> - <li>Last date for paper submission: <b> 03/10/2018</b></li> + <li>Last date for paper submission: <b> 07/10/2018</b></li> <li>Notification of acceptance: <b>22/10/2018</b></li> <li>Last date for final paper submission: <b>02/11/2018</b></li> </ul> diff --git a/static/website/templates/view-proposals.html b/static/website/templates/view-proposals.html index 8717d30..141e54b 100755 --- a/static/website/templates/view-proposals.html +++ b/static/website/templates/view-proposals.html @@ -85,7 +85,7 @@ <td style="text-align: center;"> {% if user.is_staff %} <center>{{ proposal.duration }} - {% if proposal.proposal_type == 'ABSTRACT' %} + {% if proposal.proposal_type == 'PAPER' %} Mins{% else %} Hrs {% endif %} </center> {% else %} @@ -111,7 +111,7 @@ </td> <!-- <div> - {% if not user.is_staff and type == 'ABSTRACT' %} + {% if not user.is_staff and type == 'PAPER' %} <a href="{% url 'website:submitcfw' %}" class ="btn btn-info" role="button">Submit workshop </a> {% elif not user.is_staff and type == 'WORKSHOP' %} <a href="{% url 'website:submitcfp' %}" class ="btn btn-info" role="button"> Submit paper </a> diff --git a/website/views.py b/website/views.py index 035c719..0712b23 100644 --- a/website/views.py +++ b/website/views.py @@ -85,7 +85,6 @@ def proposal(request): template = loader.get_template('proposal.html') return HttpResponse(template.render(context, request)) - # User Register @csrf_protect def userregister(request): @@ -126,7 +125,7 @@ def userregister(request): template = loader.get_template('user-register.html') return HttpResponse(template.render(context, request)) -# View Proposal/Abstract +# View Proposal/Paper @login_required @@ -148,12 +147,12 @@ def view_abstracts(request): 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: + if 'WORKSHOP' in proposal_list and 'PAPER' in proposal_list: proposal_type = 'BOTH' - elif 'WORKSHOP' in proposal_list and 'ABSTRACT' not in proposal_list: + elif 'WORKSHOP' in proposal_list and 'PAPER' not in proposal_list: proposal_type = 'WORKSHOP' else: - proposal_type = 'ABSTRACT' + proposal_type = 'PAPER' context['counts'] = count_list context['proposals'] = proposals @@ -178,7 +177,7 @@ def user_login(request): password = request.POST.get('password', None) user = authenticate(username=username, password=password) #proposals_a = Proposal.objects.filter( - # user=request.user, proposal_type='ABSTRACT').count() + # user=request.user, proposal_type='PAPER').count() if user is not None: login(request, user) proposals = Proposal.objects.filter(user=request.user).count() @@ -212,7 +211,7 @@ 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() + user=request.user, proposal_type='PAPER').count() if request.method == 'POST': form = ProposalForm(request.POST, request.FILES) if form.is_valid(): @@ -331,7 +330,7 @@ def edit_proposal(request, proposal_id=None): try: proposal = Proposal.objects.get(id=proposal_id) if proposal.status == 'Edit': - if proposal.proposal_type == 'ABSTRACT': + if proposal.proposal_type == 'PAPER': form = ProposalForm(instance=proposal) else: form = WorkshopForm(instance=proposal) @@ -339,7 +338,7 @@ def edit_proposal(request, proposal_id=None): return render(request, 'cfp.html') if request.method == 'POST': if proposal.status == 'Edit': - if proposal.proposal_type == 'ABSTRACT': + if proposal.proposal_type == 'PAPER': form = ProposalForm( request.POST, request.FILES, instance=proposal) else: @@ -467,7 +466,7 @@ def comment_abstract(request, proposal_id=None): sender_name = "NCCPS 2018" sender_email = TO_EMAIL to = (proposal.user.email, TO_EMAIL) - if proposal.proposal_type == 'ABSTRACT': + if proposal.proposal_type == 'PAPER': subject = "NCCPS 2018 - Comment on Your talk Proposal" message = """ Dear {0}, <br><br> @@ -548,7 +547,7 @@ def status(request, proposal_id=None): sender_name = "NCCPS 2018" sender_email = TO_EMAIL to = (proposal.user.email, TO_EMAIL) - if proposal.proposal_type == 'ABSTRACT': + if proposal.proposal_type == 'PAPER': subject = "NCCPS 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. @@ -571,7 +570,7 @@ def status(request, proposal_id=None): sender_name = "NCCPS 2018" sender_email = TO_EMAIL to = (proposal.user.email, TO_EMAIL, ) - if proposal.proposal_type == 'ABSTRACT': + if proposal.proposal_type == 'PAPER': subject = "NCCPS 2018 - Talk Proposal Rejected" message = """Dear """+proposal.user.first_name+""", Thank you for your submission to the conference. Unfortunately, due to the large number of excellent talks that were submitted, your talk was not selected. We hope you are not discouraged and request you to kindly attend the conference and participate. We have an excellent line up of workshops (8 in total) and many excellent talks. You may also wish to give a lightning talk (a short 5 minute talk) at the conference if you so desire. @@ -606,7 +605,7 @@ def status(request, proposal_id=None): to = (proposal.user.email, TO_EMAIL) sender_name = "NCCPS 2018" sender_email = TO_EMAIL - if proposal.proposal_type == 'ABSTRACT': + if proposal.proposal_type == 'PAPER': subject = "NCCPS 2018 - Talk Proposal Resumbmission" message = """ Dear {0}, <br><br> @@ -738,7 +737,7 @@ def status_change(request): sender_name = "NCCPS 2018" sender_email = TO_EMAIL to = (proposal.user.email, TO_EMAIL) - if proposal.proposal_type == 'ABSTRACT': + if proposal.proposal_type == 'PAPER': subject = "NCCPS 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. @@ -770,7 +769,7 @@ We strongly suggest that you try to plan your workshops carefully and focus on d sender_name = "NCCPS 2018" sender_email = TO_EMAIL to = (proposal.user.email, TO_EMAIL) - if proposal.proposal_type == 'ABSTRACT': + if proposal.proposal_type == 'PAPER': subject = "NCCPS 2018 - Talk Proposal Rejected" message = """Dear """+proposal.user.first_name+""", Thank you for your submission to the conference. Unfortunately, due to the large number of excellent talks that were submitted, your talk was not selected. We hope you are not discouraged and request you to kindly attend the conference and participate. We have an excellent line up of workshops (8 in total) and many excellent talks. You may also wish to give a lightning talk (a short 5 minute talk) at the conference if you so desire. @@ -810,7 +809,7 @@ We strongly suggest that you try to plan your workshops carefully and focus on d sender_name = "NCCPS 2018" sender_email = TO_EMAIL to = (proposal.user.email, TO_EMAIL) - if proposal.proposal_type == 'ABSTRACT': + if proposal.proposal_type == 'PAPER': subject = "NCCPS 2018 - Talk Proposal Acceptance" message = """ Dear {0}, <br><br> @@ -876,7 +875,7 @@ def edit_proposal(request, proposal_id=None): try: proposal = Proposal.objects.get(id=proposal_id) if proposal.status == 'Edit': - if proposal.proposal_type == 'ABSTRACT': + if proposal.proposal_type == 'PAPER': form = ProposalForm(instance=proposal) else: form = WorkshopForm(instance=proposal) @@ -884,7 +883,7 @@ def edit_proposal(request, proposal_id=None): return render(request, 'cfp.html') if request.method == 'POST': if proposal.status == 'Edit': - if proposal.proposal_type == 'ABSTRACT': + if proposal.proposal_type == 'PAPER': form = ProposalForm( request.POST, request.FILES, instance=proposal) else: @@ -991,3 +990,47 @@ def view_profile(request): return redirect('/login/') except: return redirect('/register/') +"""@csrf_protect +@login_required +def question_add(request): + context = {} + if request.user.is_authenticated: + social_user = request.user + + django_user = User.objects.get(username=social_user) + context['user'] = django_user + if request.method == 'POST': + form = QuestionForm(request.POST) + if form.is_valid(): + data = form.save(commit=False) + data.user = django_user + data.email = social_user.email + data.save() + return render_to_response('question-display.html', context) + return HttpResponse(template.render(context, request)) + else: + context['qform'] = form + template = loader.get_template('question-display.html') + return HttpResponse(template.render(context, request)) + else: + form = QuestionForm() + return render(request, 'question-display.html', {'qform': form}) + else: + context['login_required'] = True + return render_to_response('login.html', context) + +@csrf_protect +def quiz_view(request): + context = {} + if request.user.is_authenticated: + social_user = request.user + django_user = User.objects.get(username=social_user) + questions = Question.objects.all() + context['user'] = django_user + context['questions'] = questions + template = loader.get_template('quiz-display.html') + return HttpResponse(template.render(context, request)) + else: + context['login_required'] = True + return render_to_response('login.html', context) + |