Implemented multi-db support plus initial URL structure

Refs #24

Fixes #15
This commit is contained in:
Simon Willison 2017-10-23 19:00:37 -07:00
commit b2372605d6
5 changed files with 145 additions and 45 deletions

27
templates/database.html Normal file
View file

@ -0,0 +1,27 @@
<h1>{{ database }}</h1>
<style>
td {
vertical-align: top;
border-top: 1px solid #666;
padding: 2px 4px;
}
</style>
<table>
<tr>
{% for header in headers %}<th scope="col">{{ header }}</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>
{% else %}
{{ td }}
{% endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
</table>