Skip to content

Commit f5f29e4

Browse files
lambyrobhudson
authored andcommitted
Updated to not display EXPLAIN/PROFILE links for non-SELECT queries.
Signed-off-by: Rob Hudson <rob@cogit8.org>
1 parent ddd021b commit f5f29e4

File tree

1 file changed

+4
-4
lines changed
  • debug_toolbar/templates/debug_toolbar/panels

1 file changed

+4
-4
lines changed

debug_toolbar/templates/debug_toolbar/panels/sql.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
{% if query.params %}
1717
{% if query.is_select %}
1818
<a class="remoteCall" href="/__debug__/sql_select/?sql={{ query.raw_sql|urlencode }}&amp;params={{ query.params|urlencode }}&amp;duration={{ query.duration|floatformat:"2"|urlencode }}&amp;hash={{ query.hash }}">SELECT</a><br />
19-
{% endif %}
20-
<a class="remoteCall" href="/__debug__/sql_explain/?sql={{ query.raw_sql|urlencode }}&amp;params={{ query.params|urlencode }}&amp;duration={{ query.duration|floatformat:"2"|urlencode }}&amp;hash={{ query.hash }}">EXPLAIN</a><br />
21-
{% if is_mysql %}
22-
<a class="remoteCall" href="/__debug__/sql_profile/?sql={{ query.raw_sql|urlencode }}&amp;params={{ query.params|urlencode }}&amp;duration={{ query.duration|floatformat:"2"|urlencode }}&amp;hash={{ query.hash }}">PROFILE</a><br />
19+
<a class="remoteCall" href="/__debug__/sql_explain/?sql={{ query.raw_sql|urlencode }}&amp;params={{ query.params|urlencode }}&amp;duration={{ query.duration|floatformat:"2"|urlencode }}&amp;hash={{ query.hash }}">EXPLAIN</a><br />
20+
{% if is_mysql %}
21+
<a class="remoteCall" href="/__debug__/sql_profile/?sql={{ query.raw_sql|urlencode }}&amp;params={{ query.params|urlencode }}&amp;duration={{ query.duration|floatformat:"2"|urlencode }}&amp;hash={{ query.hash }}">PROFILE</a><br />
22+
{% endif %}
2323
{% endif %}
2424
{% endif %}
2525
</td>

0 commit comments

Comments
 (0)