Use .csv extension not querystring parameter

The link to download a CSV of notifications looks like
`/endpoint?download=csv`. This not not very web idiomatic.

The service manual recommends:
> Only use query strings for URLs with unordered parameters like options
> to search pages.

The CSV is a different representation of the same data, it does not
perform searching or filtering on the data.

The proper way (as we do elsewhere in this app) is to put an extension
on the endpoint to indicate an alternate representation, eg
`/endpoint.csv`
This commit is contained in:
Chris Hill-Scott
2016-06-07 16:35:49 +01:00
parent e1b2999371
commit 8d7850ead1
3 changed files with 50 additions and 20 deletions
+1 -1
View File
@@ -35,7 +35,7 @@
{% if notifications %}
<p class="bottom-gutter">
<a href="{{ request.url }}&amp;download=csv" download class="heading-small">Download as a CSV file</a>
<a href="{{ download_link }}" download="download" class="heading-small">Download as a CSV file</a>
&emsp;
Delivery information is available for 7 days
</p>