Edit SQL button on canned queries, closes #1019

This commit is contained in:
Simon Willison 2020-10-13 20:44:18 -07:00
commit f3a087a578
4 changed files with 85 additions and 4 deletions

View file

@ -54,6 +54,7 @@
<button id="sql-format" type="button" hidden>Format SQL</button>
{% if canned_write %}<input type="hidden" name="csrftoken" value="{{ csrftoken() }}">{% endif %}
<input type="submit" value="Run SQL">
{% if canned_query and edit_sql_url %}<a href="{{ edit_sql_url }}" class="canned-query-edit-sql">Edit SQL</a>{% endif %}
</p>
</form>