From d01370f1660d0b0360248105cd43060dca31f70f Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 12 Nov 2017 15:21:39 -0800 Subject: [PATCH] Show SQL and params if table has them applied --- datasette/templates/table.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/datasette/templates/table.html b/datasette/templates/table.html index 1d5f40a5..95463d1c 100644 --- a/datasette/templates/table.html +++ b/datasette/templates/table.html @@ -24,6 +24,11 @@

{{ "{:,}".format(table_rows) }} total row{% if table_rows == 1 %}{% else %}s{% endif %} in this table

{% endif %} +{% if query.params %} +
{{ query.sql }}
+
params = {{ query.params|tojson(4) }}
+{% endif %} +

This data as .json, .jsono