Commit 695604b1 authored by Pierre Dittgen's avatar Pierre Dittgen

PDF report filename fix

parent faadeb0d
......@@ -296,8 +296,8 @@ def pdf_report(val_code):
tmp_pdf_report.unlink()
return redirect(url_for('scdl_validator', val_code=val_code))
pdf_filename = 'rapport de validation {} {}'.format(val_code,
datetime.now().strftime('%Y-%m-%d %Hh%M'))
pdf_filename = 'Rapport de validation {} {}.pdf'.format(val_code,
datetime.now().strftime('%d-%m-%Y %Hh%M'))
response = make_response(tmp_pdf_report.read_bytes())
response.headers.set('Content-disposition', 'attachment', filename=pdf_filename)
response.headers.set('Content-type', 'application/pdf')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment