Views now show their SQL, are handled a bit better

Refs #66
This commit is contained in:
Simon Willison 2017-11-12 12:31:46 -08:00
commit ff2ab9dc7d
4 changed files with 43 additions and 27 deletions

View file

@ -16,7 +16,7 @@
{% block content %}
<div class="hd"><a href="/">home</a> / <a href="/{{ database }}-{{ database_hash }}">{{ database }}</a></div>
<h1 style="padding-left: 10px; border-left: 10px solid #{{ database_hash[:6] }}">{{ table }}</h1>
<h1 style="padding-left: 10px; border-left: 10px solid #{{ database_hash[:6] }}">{{ table }}{% if is_view %} (view){% endif %}</h1>
{% if table_rows != None %}
<h2>{{ "{:,}".format(table_rows) }} total row{% if table_rows == 1 %}{% else %}s{% endif %} in this table</h2>
@ -24,6 +24,10 @@
<p>This data as <a href="{{ url_json }}">.json</a>, <a href="{{ url_jsono }}">.jsono</a></p>
{% if view_definition %}
<pre>{{ view_definition }}</pre>
{% endif %}
<table>
<thead>
<tr>