aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/templates
diff options
context:
space:
mode:
Diffstat (limited to 'debug_toolbar/templates')
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/sql.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html
index 7de2220..1896e3c 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html
@@ -4,6 +4,7 @@
<tr>
<th>Time&nbsp;(ms)</th>
<th>Action</th>
+ <th>Stacktrace</th>
<th>Query</th>
</tr>
</thead>
@@ -20,6 +21,27 @@
{% endif %}
{% endif %}
</td>
+ <td>
+ {% if query.stacktrace %}
+ <div class="djSQLShowStacktraceDiv"><a class="djSQLShowStacktrace" href="#">Toggle Stacktrace</a></div>
+ <div class="djSQLHideStacktraceDiv" style="display:none;">
+ <table>
+ <tr>
+ <th>Line</th>
+ <th>Method</th>
+ <th>File</th>
+ </tr>
+ {% for s in query.stacktrace %}
+ <tr>
+ <td>{{ s.1 }}</td>
+ <td><pre>{{ s.2|escape }}<pre></td>
+ <td><pre>{{ s.0|escape }}</pre></td>
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
+ {% endif %}
+ </td>
<td class="syntax">{{ query.sql|safe }}</td>
</tr>
{% endfor %}