aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/templates
diff options
context:
space:
mode:
authorRob Hudson2008-10-07 12:23:18 -0700
committerRob Hudson2008-10-07 12:35:56 -0700
commit822988142666fccb216a17ef3abbee7b6bbcf76b (patch)
tree5fdc354bcbe19b2e70f8733dc79e902d88f49993 /debug_toolbar/templates
parenta3492e14765e3f898efc26913a8e8c4445a837b4 (diff)
downloaddjango-debug-toolbar-822988142666fccb216a17ef3abbee7b6bbcf76b.tar.bz2
Clicking on a template file now will fetch and show the source of the template.
Thanks to Adam Gomaa for the patch.
Diffstat (limited to 'debug_toolbar/templates')
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/template_source.html3
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/templates.html2
2 files changed, 4 insertions, 1 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/panels/template_source.html b/debug_toolbar/templates/debug_toolbar/panels/template_source.html
new file mode 100644
index 0000000..572522b
--- /dev/null
+++ b/debug_toolbar/templates/debug_toolbar/panels/template_source.html
@@ -0,0 +1,3 @@
+<a class="back" href="">&laquo;&nbsp;Back</a>
+<h3>Template Source: <samp>{{ template_name }}</samp></h3>
+{{ source }}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html
index a92657b..6c918b1 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/templates.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html
@@ -12,7 +12,7 @@
{% if templates %}
<dl>
{% for template in templates %}
- <dt><strong>{{ template.template.name|addslashes }}</strong></dt>
+ <dt><strong><a class="remoteCall" href="/__debug__/template_source/?template={{ template.template.name }}">{{ template.template.name|addslashes }}</a></strong></dt>
<dd><samp>{{ template.template.origin_name|addslashes }}</samp></dd>
<dd>
<div class="djTemplateShowContextDiv"><a class="djTemplateShowContext">Toggle Context</a></div>