Added links to .json and .jsono representations

Closes #62
This commit is contained in:
Simon Willison 2017-11-11 14:40:44 -08:00
commit 2366a016f2
5 changed files with 32 additions and 3 deletions

View file

@ -7,7 +7,11 @@
<h1 style="padding-left: 10px; border-left: 10px solid #{{ database_hash[:6] }}">{{ database }}</h1>
<p><a href="/{{ database }}-{{ database_hash }}.db">download {{ database }}.db</a></p>
{% if custom_sql %}
<p>This data as <a href="{{ url_json }}">.json</a>, <a href="{{ url_jsono }}">.jsono</a></p>
{% else %}
<p><a href="/{{ database }}-{{ database_hash }}.db">download {{ database }}.db</a></p>
{% endif %}
<table>
<thead>

View file

@ -17,6 +17,8 @@
<h1 style="padding-left: 10px; border-left: 10px solid #{{ database_hash[:6] }}">{{ table }}: {{ ', '.join(primary_key_values) }}</a></h1>
<p>This data as <a href="{{ url_json }}">.json</a>, <a href="{{ url_jsono }}">.jsono</a></p>
<table>
<thead>
<tr>

View file

@ -22,6 +22,8 @@
<h2>{{ "{:,}".format(table_rows) }} total row{% if table_rows == 1 %}{% else %}s{% endif %} in this table</h2>
{% endif %}
<p>This data as <a href="{{ url_json }}">.json</a>, <a href="{{ url_jsono }}">.jsono</a></p>
<table>
<thead>
<tr>
@ -42,8 +44,10 @@
{% endfor %}
</tbody>
</table>
{% if after_link %}
<p><a href="{{ after_link }}">Next page</a></p>
<p><a href="{{ after_link }}">Next page</a></p>
{% endif %}
{% endblock %}