This commit is contained in:
Cloud User
2024-07-14 17:51:23 +02:00

View File

@@ -7,6 +7,7 @@ def render_to_pdf(template_src, context_dict={}):
template = get_template(template_src)
html = template.render(context_dict)
response = HttpResponse(content_type='application/pdf')
response['Content-Disposition'] = 'filename="Evaluation_étudiant_clerc.pdf"'
pdf_status = pisa.CreatePDF(html, dest=response)
if pdf_status.err: