Code

Ticket #7529: files.diff

File files.diff, 901 bytes (added by Alex, 6 years ago)

Now it shows them just like POST, etc..

Line 
1diff --git a/django/views/debug.py b/django/views/debug.py
2index a118ac3..d05e46d 100644
3--- a/django/views/debug.py
4+++ b/django/views/debug.py
5@@ -577,6 +577,28 @@ Exception Value: {{ exception_value|escape }}
6   {% else %}
7     <p>No POST data</p>
8   {% endif %}
9+  <h3 id="files-info">FILES</h3>
10+  {% if request.FILES %}
11+    <table class="req">
12+        <thead>
13+            <tr>
14+                <th>Variable</th>
15+                <th>Value</th>
16+            </tr>
17+        </thead>
18+        <tbody>
19+            {% for var in request.FILES.items %}
20+                <tr>
21+                    <td>{{ var.0 }}</td>
22+                    <td class="code"><div>{{ var.1|pprint }}</div></td>
23+                </tr>
24+            {% endfor %}
25+        </tbody>
26+    </table>
27+  {% else %}
28+    <p>No FILES data</p>
29+  {% endif %}
30
31 
32   <h3 id="cookie-info">COOKIES</h3>
33   {% if request.COOKIES %}