Renaming week report with season and week number.

This commit is contained in:
Gregory Trullemans 2023-06-13 15:07:10 +02:00
parent 2b284a4705
commit c312136053
1 changed files with 3 additions and 1 deletions

View File

@ -1094,9 +1094,11 @@ def generate_week_report(request, gymnast_id, season=None, week_number=None):
response = HttpResponse(content_type="application/pdf")
response[
"Content-Disposition"
] = "attachment; filename={lastname}-{firstname}-report.pdf".format(
] = "attachment; filename={lastname}_{firstname}_weekreport_{season}_{week_number}.pdf".format(
lastname=gymnast.last_name,
firstname=gymnast.first_name,
season=season,
weeknumber=week_number
)
html = render_to_string("gymnasts/reports/report_week.html", context)