aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/templates
diff options
context:
space:
mode:
authorRob Hudson2008-09-09 12:51:28 -0700
committerRob Hudson2008-09-09 12:51:28 -0700
commitad5b511eaa86738e6ec58a91c3601369ad60eb82 (patch)
treebe70e2f370d67f9cc8ad0a376c84fd630aa90794 /debug_toolbar/templates
parentb74c985614caa336fdb1b956df5b1af69cdf8f85 (diff)
downloaddjango-debug-toolbar-ad5b511eaa86738e6ec58a91c3601369ad60eb82.tar.bz2
Merging in some changes from David Cramer for the HTTP vars panel but renaming
it to request vars since we've added session and cookie data (sessions have nothing to do with HTTP technically).
Diffstat (limited to 'debug_toolbar/templates')
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/http_vars.html42
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/request_vars.html92
2 files changed, 92 insertions, 42 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/panels/http_vars.html b/debug_toolbar/templates/debug_toolbar/panels/http_vars.html
deleted file mode 100644
index 8891f30..0000000
--- a/debug_toolbar/templates/debug_toolbar/panels/http_vars.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<h3>GET Variables</h3>
-{% if get %}
- <table>
- <thead>
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- </thead>
- <tbody>
- {% for key, value in get %}
- <tr class="{% cycle 'row1' 'row2' %}">
- <td>{{ key|escape }}</td>
- <td>{{ value|join:", "|escape }}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
-{% else %}
- <p>None</p>
-{% endif %}
-<h3>POST Variables</h3>
-{% if post %}
- <table>
- <thead>
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- </thead>
- <tbody>
- {% for key, value in post %}
- <tr class="{% cycle 'row1' 'row2' %}">
- <td>{{ key|escape }}</td>
- <td>{{ value|join:", "|escape }}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
-{% else %}
- <p>None</p>
-{% endif %} \ No newline at end of file
diff --git a/debug_toolbar/templates/debug_toolbar/panels/request_vars.html b/debug_toolbar/templates/debug_toolbar/panels/request_vars.html
new file mode 100644
index 0000000..fdb0a74
--- /dev/null
+++ b/debug_toolbar/templates/debug_toolbar/panels/request_vars.html
@@ -0,0 +1,92 @@
+<h3>COOKIES Variables</h3>
+{% if cookies %}
+ <table>
+ <colgroup>
+ <col style="width:20%"/>
+ <col/>
+ </colgroup>
+ <thead>
+ <tr>
+ <th>Key</th>
+ <th>Value</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for key, value in cookies %}
+ <tr class="{% cycle 'row1' 'row2' %}">
+ <td>{{ key|escape }}</td>
+ <td>{{ value|escape }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+{% else %}
+ <p>None</p>
+{% endif %}
+<h3>SESSION Variables</h3>
+{% if session %}
+ <table>
+ <colgroup>
+ <col style="width:20%"/>
+ <col/>
+ </colgroup>
+ <thead>
+ <tr>
+ <th>Key</th>
+ <th>Value</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for key, value in session %}
+ <tr class="{% cycle 'row1' 'row2' %}">
+ <td>{{ key|escape }}</td>
+ <td>{{ value|escape }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+{% else %}
+ <p>None</p>
+{% endif %}
+<h3>GET Variables</h3>
+{% if get %}
+ <table>
+ <thead>
+ <tr>
+ <th>Key</th>
+ <th>Value</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for key, value in get %}
+ <tr class="{% cycle 'row1' 'row2' %}">
+ <td>{{ key|escape }}</td>
+ <td>{{ value|join:", "|escape }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+{% else %}
+ <p>None</p>
+{% endif %}
+<h3>POST Variables</h3>
+{% if post %}
+ <table>
+ <thead>
+ <tr>
+ <th>Key</th>
+ <th>Value</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for key, value in post %}
+ <tr class="{% cycle 'row1' 'row2' %}">
+ <td>{{ key|escape }}</td>
+ <td>{{ value|join:", "|escape }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+{% else %}
+ <p>None</p>
+{% endif %}