Show SQL and params if table has them applied

pull/81/head
Simon Willison 2017-11-12 15:21:39 -08:00
rodzic 26370b14d8
commit d01370f166
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -24,6 +24,11 @@
<h2>{{ "{:,}".format(table_rows) }} total row{% if table_rows == 1 %}{% else %}s{% endif %} in this table</h2>
{% endif %}
{% if query.params %}
<pre>{{ query.sql }}</pre>
<pre>params = {{ query.params|tojson(4) }}</pre>
{% endif %}
<p>This data as <a href="{{ url_json }}">.json</a>, <a href="{{ url_jsono }}">.jsono</a></p>
<table>