aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/templates
diff options
context:
space:
mode:
authorAlex Gaynor2008-09-27 14:18:19 -0400
committerAlex Gaynor2008-09-27 14:18:19 -0400
commit225965ceb490d55207733aa297fd0d8a9c1cbfec (patch)
treef92829b9ac85e860aabf14235441f6cb793e0595 /debug_toolbar/templates
parent9a7fe9e528c72d39efb1954275e1e588b2bb541c (diff)
parent8d32dc2eb8a5284aa668d5b8f4b903cdf67a3e30 (diff)
downloaddjango-debug-toolbar-225965ceb490d55207733aa297fd0d8a9c1cbfec.tar.bz2
fixed merge conflicts
Diffstat (limited to 'debug_toolbar/templates')
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/cache.html4
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/sql.html10
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/templates.html22
3 files changed, 28 insertions, 8 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/panels/cache.html b/debug_toolbar/templates/debug_toolbar/panels/cache.html
index 21ea173..3142783 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/cache.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/cache.html
@@ -31,6 +31,7 @@
<td>{{ cache.get_many }}</td>
</tr>
</table>
+{% if cache.calls %}
<h3>Breakdown</h3>
<table>
<thead>
@@ -51,4 +52,5 @@
</tr>
{% endfor %}
</tbody>
-</table> \ No newline at end of file
+</table>
+{% endif %}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html
index 4663047..e218f22 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html
@@ -11,9 +11,13 @@
{% for query in queries %}
<tr class="{% cycle 'row1' 'row2' %}">
<td>{{ query.time|floatformat:"4" }}</td>
- <td><a class="remoteCall" href="/__debug__/sql_explain/?sql={{ query.raw_sql|urlencode }}&params={{ query.params|urlencode }}&time={{ query.time|floatformat:"4"|urlencode }}">EXPLAIN</a></td>
- <td>{{ query.sql|safe }}</td>
+ <td>
+ {% if query.params %}
+ <a class="remoteCall" href="/__debug__/sql_explain/?sql={{ query.raw_sql|urlencode }}&params={{ query.params|urlencode }}&time={{ query.time|floatformat:"4"|urlencode }}&hash={{ query.hash }}">EXPLAIN</a>
+ {% endif %}
+ </td>
+ <td class="syntax">{{ query.sql|safe }}</td>
</tr>
{% endfor %}
</tbody>
-</table> \ No newline at end of file
+</table>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html
index 575d507..a92657b 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/templates.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html
@@ -1,4 +1,4 @@
-<h3>Template path(s):</h3>
+<h3>Template path{{ template_dirs|length|pluralize }}:</h3>
{% if template_dirs %}
<ol>
{% for template in template_dirs %}
@@ -6,9 +6,9 @@
{% endfor %}
</ol>
{% else %}
- None
+ <p>None</p>
{% endif %}
-<h3>Templates Used</h3>
+<h3>Template{{ templates|length|pluralize }}</h3>
{% if templates %}
<dl>
{% for template in templates %}
@@ -21,5 +21,19 @@
{% endfor %}
</dl>
{% else %}
- None
+ <p>None</p>
+{% endif %}
+<h3>Context processor{{ context_processors|length|pluralize }}</h3>
+{% if context_processors %}
+<dl>
+{% for key, value in context_processors.iteritems %}
+ <dt><strong>{{ key|escape }}</strong></dt>
+ <dd>
+ <div class="djTemplateShowContextDiv"><a class="djTemplateShowContext">Toggle Context</a></div>
+ <div class="djTemplateHideContextDiv" style="display:none;"><pre>{{ value|escape }}</pre></div>
+ </dd>
+{% endfor %}
+</dl>
+{% else %}
+ <p>None</p>
{% endif %}