From 2e0ed094aed4091489e1f98544ca6e962852f5f4 Mon Sep 17 00:00:00 2001 From: binson Date: Mon, 30 Jul 2018 13:49:05 +0530 Subject: [PATCH 1/2] update:method to find the year from internship duration; remove: the text "Verify at" from the qrcode --- certificate/views.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/certificate/views.py b/certificate/views.py index 2634477..2537fe0 100755 --- a/certificate/views.py +++ b/certificate/views.py @@ -2446,9 +2446,7 @@ def create_fossee_internship_cerificate( error = False try: download_file_name = None - year = internship_project_duration[ - internship_project_duration.find('to')-5:internship_project_duration.find('to') - ].strip() + year = internship_project_duration.split()[2] if wtype == 'P': template = 'template_FIC2016Pcertificate' download_file_name = 'FIC2016Pcertificate.pdf' @@ -2544,7 +2542,7 @@ def fossee_internship16_cerificate_download(request): file_name = file_name.replace('.', '') try: old_user = Certificate.objects.get(email=email, serial_no=serial_no) - qrcode = 'Verify at: http://fossee.in/certificates/verify/{0} '.format(old_user.short_key) + qrcode = 'http://fossee.in/certificates/verify/{0} '.format(old_user.short_key) details = {'name': name, 'serial_key': old_user.short_key} certificate = create_fossee_internship_cerificate(certificate_path, details, qrcode, type, paper, internship_project_duration, student_edu_detail, student_institute_detail, superviser_name_detail, workshop, file_name) From 8934023ef38ec78f21543470455b4025c2c04242 Mon Sep 17 00:00:00 2001 From: binson Date: Mon, 30 Jul 2018 17:21:13 +0530 Subject: [PATCH 2/2] update: removed "Verify aat" from python certificate and internship certificate --- certificate/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/certificate/views.py b/certificate/views.py index 2537fe0..cc28798 100755 --- a/certificate/views.py +++ b/certificate/views.py @@ -2560,7 +2560,7 @@ def fossee_internship16_cerificate_download(request): uniqueness = True else: num += 1 - qrcode = 'Verify at: http://fossee.in/certificates/verify/{0} '.format(short_key) + qrcode = 'http://fossee.in/certificates/verify/{0} '.format(short_key) details = {'name': name, 'serial_key': short_key} certificate = create_fossee_internship_cerificate(certificate_path, details, qrcode, type, paper, internship_project_duration, student_edu_detail, student_institute_detail, superviser_name_detail, workshop, file_name) @@ -2674,7 +2674,7 @@ def python_workshop_download(request): file_name = file_name.replace('.', '') try: old_user = Certificate.objects.get(email=email, serial_no=serial_no) - qrcode = 'Verify at: http://fossee.in/certificates/verify/{0} '.format(old_user.short_key) + qrcode = 'http://fossee.in/certificates/verify/{0} '.format(old_user.short_key) details = {'name': name, 'serial_key': old_user.short_key} certificate = create_python_workshop_certificate(certificate_path, details, qrcode, type, paper, workshop, file_name, college, ws_date, is_coordinator,format) @@ -2692,7 +2692,7 @@ def python_workshop_download(request): uniqueness = True else: num += 1 - qrcode = 'Verify at: http://fossee.in/certificates/verify/{0} '.format(short_key) + qrcode = 'http://fossee.in/certificates/verify/{0} '.format(short_key) details = {'name': name, 'serial_key': short_key} certificate = create_python_workshop_certificate(certificate_path, details, qrcode, type, paper, workshop, file_name, college, ws_date, is_coordinator,format)