diff options
author | komalsheth286 | 2016-12-20 10:38:09 +0530 |
---|---|---|
committer | komalsheth286 | 2016-12-20 10:38:09 +0530 |
commit | 7708ae4c6c85f6d067c16b59d2bd20d439befb9c (patch) | |
tree | fc55c91ee0c61cde2863744dfd483669df984b41 | |
parent | a74f68593412f74670decd5ff1932e827917dc0f (diff) | |
download | certificate-generator-7708ae4c6c85f6d067c16b59d2bd20d439befb9c.tar.gz certificate-generator-7708ae4c6c85f6d067c16b59d2bd20d439befb9c.tar.bz2 certificate-generator-7708ae4c6c85f6d067c16b59d2bd20d439befb9c.zip |
Verification of QR code of TA certificate
-rwxr-xr-x | certificate/views.py | 11 |
1 files 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,<br>Please find attached the participation certificate for SciPy India 2016.<br>If you wish to print this certificate, for optimal printing, please follow these instructions:<br><br>Recommended Paper: Ivory (Matt or Glossy) White <br>Recommended GSM: Minimum of 170<br>Size: Letter size (8.5 x 11 in)<br>Print Settings: Fit to page<br><br>Regards,<br>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] |