mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
Use template name as file name for example CSV
`11.csv` or `9a1d8a7f-c202-43b9-9239-68939d34fec6.csv` is not very friendly. `Two week reminder.csv` is much nicer.
This commit is contained in:
@@ -158,7 +158,10 @@ def get_example_csv(service_id, template_id, number_of_rows=2):
|
||||
] +
|
||||
get_example_csv_rows(template, number_of_rows=number_of_rows)
|
||||
)
|
||||
return output.getvalue(), 200, {'Content-Type': 'text/csv; charset=utf-8'}
|
||||
return output.getvalue(), 200, {
|
||||
'Content-Type': 'text/csv; charset=utf-8',
|
||||
'Content-Disposition': 'inline; filename="{}.csv"'.format(template.name)
|
||||
}
|
||||
|
||||
|
||||
@main.route("/services/<service_id>/send/<template_id>/to-self", methods=['GET'])
|
||||
|
||||
Reference in New Issue
Block a user