Renaming week report with season and week number.
This commit is contained in:
parent
2b284a4705
commit
c312136053
|
@ -1094,9 +1094,11 @@ def generate_week_report(request, gymnast_id, season=None, week_number=None):
|
||||||
response = HttpResponse(content_type="application/pdf")
|
response = HttpResponse(content_type="application/pdf")
|
||||||
response[
|
response[
|
||||||
"Content-Disposition"
|
"Content-Disposition"
|
||||||
] = "attachment; filename={lastname}-{firstname}-report.pdf".format(
|
] = "attachment; filename={lastname}_{firstname}_weekreport_{season}_{week_number}.pdf".format(
|
||||||
lastname=gymnast.last_name,
|
lastname=gymnast.last_name,
|
||||||
firstname=gymnast.first_name,
|
firstname=gymnast.first_name,
|
||||||
|
season=season,
|
||||||
|
weeknumber=week_number
|
||||||
)
|
)
|
||||||
|
|
||||||
html = render_to_string("gymnasts/reports/report_week.html", context)
|
html = render_to_string("gymnasts/reports/report_week.html", context)
|
||||||
|
|
Loading…
Reference in New Issue