mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Show error message on bad query, closes #619
This commit is contained in:
parent
9552414e1f
commit
ea5b237800
2 changed files with 12 additions and 2 deletions
|
|
@ -34,8 +34,8 @@
|
|||
|
||||
<form class="sql" action="{{ urls.database(database) }}{% if canned_query %}/{{ canned_query }}{% endif %}" method="{% if canned_write %}post{% else %}get{% endif %}">
|
||||
<h3>Custom SQL query{% if display_rows %} returning {% if truncated %}more than {% endif %}{{ "{:,}".format(display_rows|length) }} row{% if display_rows|length == 1 %}{% else %}s{% endif %}{% endif %}{% if not query_error %} <span class="show-hide-sql">{% if hide_sql %}(<a href="{{ path_with_removed_args(request, {'_hide_sql': '1'}) }}">show</a>){% else %}(<a href="{{ path_with_added_args(request, {'_hide_sql': '1'}) }}">hide</a>){% endif %}</span>{% endif %}</h3>
|
||||
{% if query_error %}
|
||||
<p class="message-error">{{ query_error }}</p>
|
||||
{% if error %}
|
||||
<p class="message-error">{{ error }}</p>
|
||||
{% endif %}
|
||||
{% if not hide_sql %}
|
||||
{% if editable and allow_execute_sql %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue