From 7708ae4c6c85f6d067c16b59d2bd20d439befb9c Mon Sep 17 00:00:00 2001 From: komalsheth286 Date: Tue, 20 Dec 2016 10:38:09 +0530 Subject: Verification of QR code of TA certificate --- certificate/views.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/certificate/views.py b/certificate/views.py index 6972bc9..f7d7865 100755 --- a/certificate/views.py +++ b/certificate/views.py @@ -165,7 +165,7 @@ def verification(serial, _type): ('Project', 'FreeEDA Textbook Companion'), ('Books completed', ','.join(books))]) else: detail = '{0} had attended {1} {2}'.format(name, purpose, year) - elif type == 'A': + elif type == 'A' or type == 'T': detail = '{0} had presented paper on {3} in the {1} {2}'.format\ (name, purpose, year, paper) if purpose == 'SciPy India': @@ -189,7 +189,7 @@ def verification(serial, _type): else: detail = '{0} had attended {1} {2}'.format(name, purpose, year) - elif type == 'W' or type == 'T': + elif type == 'W': detail = '{0} had attended workshop on {3} in the {1} {2}'.format\ (name, purpose, year, workshop) context['serial_key'] = True @@ -225,9 +225,9 @@ def verification(serial, _type): detail['Year'] = year else: detail = '{0} had attended {1} {2}'.format(name, purpose, year) - elif type == 'A': + elif type == 'A' or type == 'T': detail = '{0} had presented paper on {3} in the {1} {2}'.format(name, purpose, year, paper) - elif type == 'W' or type == 'T': + elif type == 'W' : detail = '{0} had attended workshop on {3} in the {1} {2}'.format(name, purpose, year, workshop) context['detail'] = detail except Certificate.DoesNotExist: @@ -1936,8 +1936,6 @@ def create_scipy_certificate_2016(certificate_path, name, qrcode, type, paper, w message = """ Dear Participant,
Please find attached the participation certificate for SciPy India 2016.
If you wish to print this certificate, for optimal printing, please follow these instructions:

Recommended Paper: Ivory (Matt or Glossy) White
Recommended GSM: Minimum of 170
Size: Letter size (8.5 x 11 in)
Print Settings: Fit to page

Regards,
SciPy India Team """ - - email = EmailMultiAlternatives( subject,'', sender_email, to, @@ -1954,7 +1952,6 @@ def create_scipy_certificate_2016(certificate_path, name, qrcode, type, paper, w else: error = True - except Exception, e: error = True return [None, error] -- cgit