datasette/datasite/templates/database.html
Simon Willison 1592fd0419 Started work on cli, which also meant adding setup.py
I'm using click, and click recommends using a setup.py - so I've added one of
those. I also refactored code into a new datasite package. It's not quite
deploying to now properly at the moment though - I seem to have messed up the
path handling a bit.

Also snuck in a new template for the "Row" view.

Refs #40
2017-10-27 00:08:24 -07:00

35 lines
879 B
HTML

{% extends "base.html" %}
{% block title %}{{ database }}{% endblock %}
{% block content %}
<h1>{{ database }}</h1>
<p><a href="/{{ database }}-{{ database_hash }}.db">download {{ database }}.db</a></p>
<style>
td {
vertical-align: top;
border-top: 1px solid #666;
padding: 2px 4px;
}
</style>
<table>
<tr>
{% 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 in ("table", "view") %}
<a href="/{{ database }}-{{ database_hash }}/{{ td }}">{{ td }}</a>
{% else %}
{{ td }}
{% endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
</table>
{% endblock %}