summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--certificate/scipy_template_2016/pr_sign.png (renamed from certificate/scipy_template_2016/kannan-moudgalya-sign.png)bin79661 -> 79661 bytes
-rwxr-xr-xcertificate/views.py34
2 files changed, 1 insertions, 33 deletions
diff --git a/certificate/scipy_template_2016/kannan-moudgalya-sign.png b/certificate/scipy_template_2016/pr_sign.png
index 6feda2d..6feda2d 100644
--- a/certificate/scipy_template_2016/kannan-moudgalya-sign.png
+++ b/certificate/scipy_template_2016/pr_sign.png
Binary files differ
diff --git a/certificate/views.py b/certificate/views.py
index f7d7865..19c161b 100755
--- a/certificate/views.py
+++ b/certificate/views.py
@@ -1726,40 +1726,8 @@ def create_scipy_certificate_2015(certificate_path, name, qrcode, type, paper, w
@csrf_exempt
def scipy_feedback_2016(request):
- context = {}
- ci = RequestContext(request)
- form = FeedBackForm()
- questions = Question.objects.filter(purpose='SPC2016')
- if request.method == 'POST':
- form = FeedBackForm(request.POST)
- if form.is_valid():
- data = form.cleaned_data
- try:
- FeedBack.objects.get(email=data['email'].strip(), purpose='SPC2016')
- context['message'] = 'You have already submitted the feedback. You can download your certificate.'
- return render_to_response('scipy_download_2016.html', context, ci)
- except FeedBack.DoesNotExist:
- feedback = FeedBack()
- feedback.name = data['name'].strip()
- feedback.email = data['email'].strip()
- feedback.purpose = 'SPC2016'
- feedback.submitted = True
- feedback.save()
- for question in questions:
- answered = request.POST.get('{0}'.format(question.id), None)
- answer = Answer()
- answer.question = question
- answer.answer = answered.strip()
- answer.save()
- feedback.answer.add(answer)
- feedback.save()
- context['message'] = ''
- return render_to_response('scipy_download_2016.html', context, ci)
-
- context['form'] = form
- context['questions'] = questions
+ return render_to_response('scipy_feedback_2016.html')
- return render_to_response('scipy_feedback_2016.html', context, ci)
@csrf_exempt
def scipy_download_2016(request):