aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/templates
diff options
context:
space:
mode:
authorPercy Perez-Pinedo2009-07-20 15:46:57 -0700
committerPercy Perez-Pinedo2009-07-20 15:46:57 -0700
commitb7629d5768295131c35d613dbb16d9a070474c77 (patch)
treef7557bdc972287765a0bb687c2fecf04ddd0718f /debug_toolbar/templates
parent073ab2c8255ebc310a54e9f937b4b17f94f7eac2 (diff)
parent4dc0710b6a5eedec0448909f6b90e55a4f3555d4 (diff)
downloaddjango-debug-toolbar-b7629d5768295131c35d613dbb16d9a070474c77.tar.bz2
removing trans so we can merge for now
Diffstat (limited to 'debug_toolbar/templates')
-rw-r--r--debug_toolbar/templates/debug_toolbar/base.html18
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/headers.html2
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/logger.html2
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/request_vars.html6
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/settings_vars.html2
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/signals.html19
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/sql.html30
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/sql_explain.html2
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/sql_profile.html2
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/sql_select.html2
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/timer.html2
-rw-r--r--debug_toolbar/templates/debug_toolbar/redirect.html2
12 files changed, 73 insertions, 16 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html
index fca6256..66d126e 100644
--- a/debug_toolbar/templates/debug_toolbar/base.html
+++ b/debug_toolbar/templates/debug_toolbar/base.html
@@ -1,18 +1,29 @@
{% load i18n %}
<script type="text/javascript" charset="utf-8">
+ // When jQuery is sourced, it's going to overwrite whatever might be in the
+ // '$' variable, so store a reference of it in a temporary variable...
+ var _$ = window.$;
if (typeof jQuery == 'undefined') {
var jquery_url = '{{ BASE_URL }}/__debug__/m/jquery.js';
document.write(unescape('%3Cscript src="' + jquery_url + '" type="text/javascript"%3E%3C/script%3E'));
}
</script>
<script type="text/javascript" src="{{ BASE_URL }}/__debug__/m/toolbar.min.js"></script>
+<script type="text/javascript" charset="utf-8">
+ // Now that jQuery is done loading, put the '$' variable back to what it was...
+ var $ = _$;
+</script>
<style type="text/css">
@import url({{ BASE_URL }}/__debug__/m/toolbar.min.css);
</style>
<div id="djDebug">
- <div id="djDebugToolbar">
+ <div style="display: none;" id="djDebugToolbar">
<ul id="djDebugPanelList">
+ {% if panels %}
+ <li><a id="djHideToolBarButton" href="#" title="Hide Toolbar">&laquo; Hide</a></li>
+ {% else %}
<li id="djDebugButton">DEBUG</li>
+ {% endif %}
{% for panel in panels %}
<li>
{% if panel.has_content %}
@@ -24,6 +35,11 @@
{% endfor %}
</ul>
</div>
+ <div style="display: none;" id="djDebugToolbarHandle">
+ <ul id="djDebugPanelList">
+ <li><a title="Show Toolbar" id="djShowToolBarButton" href="#">&raquo;</a></li>
+ </ul>
+ </div>
{% for panel in panels %}
{% if panel.has_content %}
<div id="{{ panel.dom_id }}" class="panelContent">
diff --git a/debug_toolbar/templates/debug_toolbar/panels/headers.html b/debug_toolbar/templates/debug_toolbar/panels/headers.html
index 0a1578d..dec83bf 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/headers.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/headers.html
@@ -9,7 +9,7 @@
</thead>
<tbody>
{% for key, value in headers.iteritems %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ key|escape }}</td>
<td>{{ value|escape }}</td>
</tr>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/logger.html b/debug_toolbar/templates/debug_toolbar/panels/logger.html
index 112cc7d..441337c 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/logger.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/logger.html
@@ -12,7 +12,7 @@
</thead>
<tbody>
{% for record in records %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ record.level }}</td>
<td>{{ record.time|date:"h:i:s m/d/Y" }}</td>
<td>{{ record.message }}</td>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/request_vars.html b/debug_toolbar/templates/debug_toolbar/panels/request_vars.html
index 751e1da..677714d 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/request_vars.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/request_vars.html
@@ -14,7 +14,7 @@
</thead>
<tbody>
{% for key, value in cookies %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ key|escape }}</td>
<td>{{ value|escape }}</td>
</tr>
@@ -39,7 +39,7 @@
</thead>
<tbody>
{% for key, value in session %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ key|escape }}</td>
<td>{{ value|escape }}</td>
</tr>
@@ -60,7 +60,7 @@
</thead>
<tbody>
{% for key, value in get %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ key|escape }}</td>
<td>{{ value|join:", "|escape }}</td>
</tr>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html b/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html
index 7b285ff..92b65cd 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html
@@ -9,7 +9,7 @@
</thead>
<tbody>
{% for var in settings.items|dictsort:"0" %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ var.0 }}</td>
<td><code>{{ var.1|pprint }}</code></td>
</tr>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/signals.html b/debug_toolbar/templates/debug_toolbar/panels/signals.html
new file mode 100644
index 0000000..e9a189e
--- /dev/null
+++ b/debug_toolbar/templates/debug_toolbar/panels/signals.html
@@ -0,0 +1,19 @@
+<h3>Signals</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Signal</th>
+ <th>Providing Args</th>
+ <th>Receivers</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for name, signal, receivers in signals %}
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
+ <td>{{ name|escape }}</td>
+ <td>{{ signal.providing_args|join:", " }}</td>
+ <td>{{ receivers|join:", " }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html
index 50480bf..99ce611 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html
@@ -3,14 +3,15 @@
<table>
<thead>
<tr>
- <th>{% trans "Time" %}&nbsp;(ms)</th>
- <th>{% trans "Action" %}</th>
- <th>{% trans "Query" %}</th>
+ <th>Time&nbsp;(ms)</th>
+ <th>Action</th>
+ <th>Stacktrace</th>
+ <th>Query</th>
</tr>
</thead>
<tbody>
{% for query in queries %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ query.time|floatformat:"2" }}</td>
<td>
{% if query.params %}
@@ -21,6 +22,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 file, line, method in query.stacktrace %}
+ <tr>
+ <td>{{ line }}</td>
+ <td><pre>{{ method|escape }}<pre></td>
+ <td><pre>{{ file|escape }}</pre></td>
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
+ {% endif %}
+ </td>
<td class="syntax">{{ query.sql|safe }}</td>
</tr>
{% endfor %}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html b/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html
index cb3ca5e..64076e7 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html
@@ -17,7 +17,7 @@
</thead>
<tbody>
{% for row in result %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
{% for column in row %}
<td>{{ column|escape }}</td>
{% endfor %}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html b/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html
index c058b2b..f53dcc0 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html
@@ -17,7 +17,7 @@
</thead>
<tbody>
{% for row in result %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
{% for column in row %}
<td>{{ column|escape }}</td>
{% endfor %}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql_select.html b/debug_toolbar/templates/debug_toolbar/panels/sql_select.html
index c2ab7b6..1438050 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql_select.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql_select.html
@@ -18,7 +18,7 @@
</thead>
<tbody>
{% for row in result %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
{% for column in row %}
<td>{{ column|escape }}</td>
{% endfor %}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/timer.html b/debug_toolbar/templates/debug_toolbar/panels/timer.html
index 2d409b0..f593b44 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/timer.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/timer.html
@@ -13,7 +13,7 @@
</thead>
<tbody>
{% for key, value in rows %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ key|escape }}</td>
<td>{{ value|escape }}</td>
</tr>
diff --git a/debug_toolbar/templates/debug_toolbar/redirect.html b/debug_toolbar/templates/debug_toolbar/redirect.html
index cdc08b9..5611977 100644
--- a/debug_toolbar/templates/debug_toolbar/redirect.html
+++ b/debug_toolbar/templates/debug_toolbar/redirect.html
@@ -4,7 +4,7 @@
</head>
<body>
<h1>HttpResponseRedirect</h1>
-<p>Location: <a href="{{ redirect_to }}">{{ redirect_to }}</a></p>
+<p>Location: <a href="{{ redirect_to|urlencode }}">{{ redirect_to }}</a></p>
<p class="notice">
{% trans "The Django Debug Toolbar has intercepted a redirect to the above URL for
debug viewing purposes. You can click the above link to continue with the