diff options
| -rw-r--r-- | debug_toolbar/panels/sql.py | 1 | ||||
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/panels/sql.html | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/debug_toolbar/panels/sql.py b/debug_toolbar/panels/sql.py index e202994..22d2690 100644 --- a/debug_toolbar/panels/sql.py +++ b/debug_toolbar/panels/sql.py @@ -65,6 +65,7 @@ class SQLDebugPanel(DebugPanel): context = { 'queries': sql_queries, 'sql_time': self._sql_time, + 'is_mysql': settings.DATABASE_ENGINE == 'mysql', } return render_to_string('debug_toolbar/panels/sql.html', context) diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index f6ff64f..7de2220 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -15,7 +15,9 @@ {% if query.params %} <a class="remoteCall" href="/__debug__/sql_select/?sql={{ query.raw_sql|urlencode }}¶ms={{ query.params|urlencode }}&time={{ query.time|floatformat:"2"|urlencode }}&hash={{ query.hash }}">SELECT</a> <a class="remoteCall" href="/__debug__/sql_explain/?sql={{ query.raw_sql|urlencode }}¶ms={{ query.params|urlencode }}&time={{ query.time|floatformat:"2"|urlencode }}&hash={{ query.hash }}">EXPLAIN</a> - <a class="remoteCall" href="/__debug__/sql_profile/?sql={{ query.raw_sql|urlencode }}¶ms={{ query.params|urlencode }}&time={{ query.time|floatformat:"2"|urlencode }}&hash={{ query.hash }}">PROFILE</a> + {% if is_mysql %} + <a class="remoteCall" href="/__debug__/sql_profile/?sql={{ query.raw_sql|urlencode }}¶ms={{ query.params|urlencode }}&time={{ query.time|floatformat:"2"|urlencode }}&hash={{ query.hash }}">PROFILE</a> + {% endif %} {% endif %} </td> <td class="syntax">{{ query.sql|safe }}</td> |
