summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkomalsheth2862016-12-20 11:51:44 +0530
committerkomalsheth2862016-12-20 11:51:44 +0530
commit9197438aa3a8c66a4fd6f99ba540b89b8cf92449 (patch)
tree1cd8019e5c3640bbe16ec998c672b6a73d8c88f3
parent7708ae4c6c85f6d067c16b59d2bd20d439befb9c (diff)
downloadcertificate-generator-9197438aa3a8c66a4fd6f99ba540b89b8cf92449.tar.gz
certificate-generator-9197438aa3a8c66a4fd6f99ba540b89b8cf92449.tar.bz2
certificate-generator-9197438aa3a8c66a4fd6f99ba540b89b8cf92449.zip
Comments resolved
-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):