summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2009-03-31 17:10:06 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2009-03-31 17:10:06 +0000
commitcc5477df890f66854275c2b3ce46e8457fe8a6b2 (patch)
tree695b2c163a0101bdf5e57c069e01c2c5e3f04ee7 /django
parent33e87318c046ea73ed380b135eb1bbb471d301f3 (diff)
Fixed #7529: added a FILES section to the debug view. As a bonus, we've now got
the start of a suite of tests for the debug views. Thanks, Alex Gaynor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10271 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/views/debug.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/django/views/debug.py b/django/views/debug.py
index f2288cf173..650aebae10 100644
--- a/django/views/debug.py
+++ b/django/views/debug.py
@@ -611,6 +611,28 @@ Exception Value: {{ exception_value|escape }}
{% else %}
<p>No POST data</p>
{% endif %}
+ <h3 id="files-info">FILES</h3>
+ {% if request.FILES %}
+ <table class="req">
+ <thead>
+ <tr>
+ <th>Variable</th>
+ <th>Value</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for var in request.FILES.items %}
+ <tr>
+ <td>{{ var.0 }}</td>
+ <td class="code"><div>{{ var.1|pprint }}</div></td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ {% else %}
+ <p>No FILES data</p>
+ {% endif %}
+
<h3 id="cookie-info">COOKIES</h3>
{% if request.COOKIES %}