changement nom du fichier exporté dans list_pdf_export

This commit is contained in:
2024-07-14 17:51:02 +02:00
parent a88f60f112
commit 1cd55e3df4

View File

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