Skip to content

Commit

Permalink
delete: fossee_internship_cerificate_download.html ; update: create i…
Browse files Browse the repository at this point in the history
…nternship func according to pep8
  • Loading branch information
binson-b committed Jul 27, 2018
1 parent 7e122c9 commit 79d7d7a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 70 deletions.
67 changes: 0 additions & 67 deletions certificate/templates/fossee_internship_cerificate_download.html

This file was deleted.

13 changes: 10 additions & 3 deletions certificate/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2438,11 +2438,17 @@ def fossee_internship_cerificate_download(request):
return render_to_response('fossee_internship_cerificate_download.html', context, ci)


def create_fossee_internship_cerificate(certificate_path, name, qrcode, wtype, paper, internship_project_duration, student_edu_detail, student_institute_detail, superviser_name_detail, workshop, file_name):
def create_fossee_internship_cerificate(
certificate_path, name, qrcode,
wtype, paper, internship_project_duration, student_edu_detail,
student_institute_detail, superviser_name_detail,
workshop, file_name):
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[
internship_project_duration.find('to')-5:internship_project_duration.find('to')
].strip()
if wtype == 'P':
template = 'template_FIC2016Pcertificate'
download_file_name = 'FIC2016Pcertificate.pdf'
Expand Down Expand Up @@ -2470,7 +2476,8 @@ def create_fossee_internship_cerificate(certificate_path, name, qrcode, wtype, p
(certificate_path, file_name), 'w')
create_tex.write(content_tex)
create_tex.close()
return_value, err = _make_certificate_certificate(certificate_path, wtype, file_name)
return_value, err = _make_certificate_certificate(certificate_path,
wtype, file_name)
if return_value == 0:
pdf = open('{0}{1}.pdf'.format(certificate_path, file_name) , 'r')
response = HttpResponse(content_type='application/pdf')
Expand Down

0 comments on commit 79d7d7a

Please sign in to comment.