Refactored to use class based views

Closes #22
This commit is contained in:
Simon Willison 2017-10-23 19:25:48 -07:00
commit 9d21914069
3 changed files with 59 additions and 42 deletions

View file

@ -9,14 +9,14 @@ td {
</style>
<table>
<tr>
{% for header in headers %}<th scope="col">{{ header }}</th>{% endfor %}
{% for column in columns %}<th scope="col">{{ column }}</th>{% endfor %}
</tr>
{% for row in rows %}
<tr>
{% for td in row %}
<td>
{% if loop.index == 2 and row.type == "table" %}
<a href="/{{ database }}/{{ td }}">{{ td }}</a>
<a href="/{{ database }}-{{ database_hash }}/{{ td }}">{{ td }}</a>
{% else %}
{{ td }}
{% endif %}