From 9197438aa3a8c66a4fd6f99ba540b89b8cf92449 Mon Sep 17 00:00:00 2001 From: komalsheth286 Date: Tue, 20 Dec 2016 11:51:44 +0530 Subject: Comments resolved --- .../scipy_template_2016/kannan-moudgalya-sign.png | Bin 79661 -> 0 bytes certificate/scipy_template_2016/pr_sign.png | Bin 0 -> 79661 bytes certificate/views.py | 34 +-------------------- 3 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 certificate/scipy_template_2016/kannan-moudgalya-sign.png create mode 100644 certificate/scipy_template_2016/pr_sign.png diff --git a/certificate/scipy_template_2016/kannan-moudgalya-sign.png b/certificate/scipy_template_2016/kannan-moudgalya-sign.png deleted file mode 100644 index 6feda2d..0000000 Binary files a/certificate/scipy_template_2016/kannan-moudgalya-sign.png and /dev/null differ diff --git a/certificate/scipy_template_2016/pr_sign.png b/certificate/scipy_template_2016/pr_sign.png new file mode 100644 index 0000000..6feda2d Binary files /dev/null and b/certificate/scipy_template_2016/pr_sign.png 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): -- cgit