Ticket #29335: django_technical_500.html

File django_technical_500.html, 17.1 KB (added by Malik A. Rumi, 7 years ago)
Line 
1django/django/views/templates/technical_500.html
2@malikarumi malikarumi changed default pastebin link to dpaste.de, which is the site used by Django IRC.
3This is related to #11919 & #26611. I also changed the submit value on the button to match.
4
5@timgraham @claudep
6
7486 lines (470 sloc) 16.8 KB
8<!DOCTYPE html>
9<html lang="en">
10<head>
11 <meta http-equiv="content-type" content="text/html; charset=utf-8">
12 <meta name="robots" content="NONE,NOARCHIVE">
13 <title>{% if exception_type %}{{ exception_type }}{% else %}Report{% endif %}
14 {% if request %} at {{ request.path_info }}{% endif %}</title>
15 <style type="text/css">
16 html * { padding:0; margin:0; }
17 body * { padding:10px 20px; }
18 body * * { padding:0; }
19 body { font:small sans-serif; background-color:#fff; color:#000; }
20 body>div { border-bottom:1px solid #ddd; }
21 h1 { font-weight:normal; }
22 h2 { margin-bottom:.8em; }
23 h2 span { font-size:80%; color:#666; font-weight:normal; }
24 h3 { margin:1em 0 .5em 0; }
25 h4 { margin:0 0 .5em 0; font-weight: normal; }
26 code, pre { font-size: 100%; white-space: pre-wrap; }
27 table { border:1px solid #ccc; border-collapse: collapse; width:100%; background:white; }
28 tbody td, tbody th { vertical-align:top; padding:2px 3px; }
29 thead th {
30 padding:1px 6px 1px 3px; background:#fefefe; text-align:left;
31 font-weight:normal; font-size:11px; border:1px solid #ddd;
32 }
33 tbody th { width:12em; text-align:right; color:#666; padding-right:.5em; }
34 table.vars { margin:5px 0 2px 40px; }
35 table.vars td, table.req td { font-family:monospace; }
36 table td.code { width:100%; }
37 table td.code pre { overflow:hidden; }
38 table.source th { color:#666; }
39 table.source td { font-family:monospace; white-space:pre; border-bottom:1px solid #eee; }
40 ul.traceback { list-style-type:none; color: #222; }
41 ul.traceback li.frame { padding-bottom:1em; color:#666; }
42 ul.traceback li.user { background-color:#e0e0e0; color:#000 }
43 div.context { padding:10px 0; overflow:hidden; }
44 div.context ol { padding-left:30px; margin:0 10px; list-style-position: inside; }
45 div.context ol li { font-family:monospace; white-space:pre; color:#777; cursor:pointer; padding-left: 2px; }
46 div.context ol li pre { display:inline; }
47 div.context ol.context-line li { color:#505050; background-color:#dfdfdf; padding: 3px 2px; }
48 div.context ol.context-line li span { position:absolute; right:32px; }
49 .user div.context ol.context-line li { background-color:#bbb; color:#000; }
50 .user div.context ol li { color:#666; }
51 div.commands { margin-left: 40px; }
52 div.commands a { color:#555; text-decoration:none; }
53 .user div.commands a { color: black; }
54 #summary { background: #ffc; }
55 #summary h2 { font-weight: normal; color: #666; }
56 #explanation { background:#eee; }
57 #template, #template-not-exist { background:#f6f6f6; }
58 #template-not-exist ul { margin: 0 0 10px 20px; }
59 #template-not-exist .postmortem-section { margin-bottom: 3px; }
60 #unicode-hint { background:#eee; }
61 #traceback { background:#eee; }
62 #requestinfo { background:#f6f6f6; padding-left:120px; }
63 #summary table { border:none; background:transparent; }
64 #requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; }
65 #requestinfo h3 { margin-bottom:-1em; }
66 .error { background: #ffc; }
67 .specific { color:#cc3300; font-weight:bold; }
68 h2 span.commands { font-size:.7em;}
69 span.commands a:link {color:#5E5694;}
70 pre.exception_value { font-family: sans-serif; color: #666; font-size: 1.5em; margin: 10px 0 10px 0; }
71 .append-bottom { margin-bottom: 10px; }
72 </style>
73 {% if not is_email %}
74 <script type="text/javascript">
75 function hideAll(elems) {
76 for (var e = 0; e < elems.length; e++) {
77 elems[e].style.display = 'none';
78 }
79 }
80 window.onload = function() {
81 hideAll(document.querySelectorAll('table.vars'));
82 hideAll(document.querySelectorAll('ol.pre-context'));
83 hideAll(document.querySelectorAll('ol.post-context'));
84 hideAll(document.querySelectorAll('div.pastebin'));
85 }
86 function toggle() {
87 for (var i = 0; i < arguments.length; i++) {
88 var e = document.getElementById(arguments[i]);
89 if (e) {
90 e.style.display = e.style.display == 'none' ? 'block': 'none';
91 }
92 }
93 return false;
94 }
95 function varToggle(link, id) {
96 toggle('v' + id);
97 var s = link.getElementsByTagName('span')[0];
98 var uarr = String.fromCharCode(0x25b6);
99 var darr = String.fromCharCode(0x25bc);
100 s.textContent = s.textContent == uarr ? darr : uarr;
101 return false;
102 }
103 function switchPastebinFriendly(link) {
104 s1 = "Switch to copy-and-paste view";
105 s2 = "Switch back to interactive view";
106 link.textContent = link.textContent.trim() == s1 ? s2: s1;
107 toggle('browserTraceback', 'pastebinTraceback');
108 return false;
109 }
110 </script>
111 {% endif %}
112</head>
113<body>
114<div id="summary">
115 <h1>{% if exception_type %}{{ exception_type }}{% else %}Report{% endif %}
116 {% if request %} at {{ request.path_info }}{% endif %}</h1>
117 <pre class="exception_value">{% if exception_value %}{{ exception_value|force_escape }}{% else %}No exception message supplied{% endif %}</pre>
118 <table class="meta">
119{% if request %}
120 <tr>
121 <th>Request Method:</th>
122 <td>{{ request.META.REQUEST_METHOD }}</td>
123 </tr>
124 <tr>
125 <th>Request URL:</th>
126 <td>{{ request.get_raw_uri }}</td>
127 </tr>
128{% endif %}
129 <tr>
130 <th>Django Version:</th>
131 <td>{{ django_version_info }}</td>
132 </tr>
133{% if exception_type %}
134 <tr>
135 <th>Exception Type:</th>
136 <td>{{ exception_type }}</td>
137 </tr>
138{% endif %}
139{% if exception_type and exception_value %}
140 <tr>
141 <th>Exception Value:</th>
142 <td><pre>{{ exception_value|force_escape }}</pre></td>
143 </tr>
144{% endif %}
145{% if lastframe %}
146 <tr>
147 <th>Exception Location:</th>
148 <td>{{ lastframe.filename }} in {{ lastframe.function }}, line {{ lastframe.lineno }}</td>
149 </tr>
150{% endif %}
151 <tr>
152 <th>Python Executable:</th>
153 <td>{{ sys_executable }}</td>
154 </tr>
155 <tr>
156 <th>Python Version:</th>
157 <td>{{ sys_version_info }}</td>
158 </tr>
159 <tr>
160 <th>Python Path:</th>
161 <td><pre>{{ sys_path|pprint }}</pre></td>
162 </tr>
163 <tr>
164 <th>Server time:</th>
165 <td>{{server_time|date:"r"}}</td>
166 </tr>
167 </table>
168</div>
169{% if unicode_hint %}
170<div id="unicode-hint">
171 <h2>Unicode error hint</h2>
172 <p>The string that could not be encoded/decoded was: <strong>{{ unicode_hint }}</strong></p>
173</div>
174{% endif %}
175{% if template_does_not_exist %}
176<div id="template-not-exist">
177 <h2>Template-loader postmortem</h2>
178 {% if postmortem %}
179 <p class="append-bottom">Django tried loading these templates, in this order:</p>
180 {% for entry in postmortem %}
181 <p class="postmortem-section">Using engine <code>{{ entry.backend.name }}</code>:</p>
182 <ul>
183 {% if entry.tried %}
184 {% for attempt in entry.tried %}
185 <li><code>{{ attempt.0.loader_name }}</code>: {{ attempt.0.name }} ({{ attempt.1 }})</li>
186 {% endfor %}
187 {% else %}
188 <li>This engine did not provide a list of tried templates.</li>
189 {% endif %}
190 </ul>
191 {% endfor %}
192 {% else %}
193 <p>No templates were found because your 'TEMPLATES' setting is not configured.</p>
194 {% endif %}
195</div>
196{% endif %}
197{% if template_info %}
198<div id="template">
199 <h2>Error during template rendering</h2>
200 <p>In template <code>{{ template_info.name }}</code>, error at line <strong>{{ template_info.line }}</strong></p>
201 <h3>{{ template_info.message }}</h3>
202 <table class="source{% if template_info.top %} cut-top{% endif %}
203 {% if template_info.bottom != template_info.total %} cut-bottom{% endif %}">
204 {% for source_line in template_info.source_lines %}
205 {% if source_line.0 == template_info.line %}
206 <tr class="error"><th>{{ source_line.0 }}</th>
207 <td>{{ template_info.before }}<span class="specific">{{ template_info.during }}</span>{{ template_info.after }}</td>
208 </tr>
209 {% else %}
210 <tr><th>{{ source_line.0 }}</th>
211 <td>{{ source_line.1 }}</td></tr>
212 {% endif %}
213 {% endfor %}
214 </table>
215</div>
216{% endif %}
217{% if frames %}
218<div id="traceback">
219 <h2>Traceback <span class="commands">{% if not is_email %}<a href="#" onclick="return switchPastebinFriendly(this);">
220 Switch to copy-and-paste view</a></span>{% endif %}
221 </h2>
222 <div id="browserTraceback">
223 <ul class="traceback">
224 {% for frame in frames %}
225 {% ifchanged frame.exc_cause %}{% if frame.exc_cause %}
226 <li><h3>
227 {% if frame.exc_cause_explicit %}
228 The above exception ({{ frame.exc_cause|force_escape }}) was the direct cause of the following exception:
229 {% else %}
230 During handling of the above exception ({{ frame.exc_cause|force_escape }}), another exception occurred:
231 {% endif %}
232 </h3></li>
233 {% endif %}{% endifchanged %}
234 <li class="frame {{ frame.type }}">
235 <code>{{ frame.filename }}</code> in <code>{{ frame.function }}</code>
236
237 {% if frame.context_line %}
238 <div class="context" id="c{{ frame.id }}">
239 {% if frame.pre_context and not is_email %}
240 <ol start="{{ frame.pre_context_lineno }}" class="pre-context" id="pre{{ frame.id }}">
241 {% for line in frame.pre_context %}
242 <li onclick="toggle('pre{{ frame.id }}', 'post{{ frame.id }}')"><pre>{{ line }}</pre></li>
243 {% endfor %}
244 </ol>
245 {% endif %}
246 <ol start="{{ frame.lineno }}" class="context-line">
247 <li onclick="toggle('pre{{ frame.id }}', 'post{{ frame.id }}')"><pre>{{ frame.context_line }}</pre>{% if not is_email %} <span>...</span>{% endif %}</li>
248 </ol>
249 {% if frame.post_context and not is_email %}
250 <ol start='{{ frame.lineno|add:"1" }}' class="post-context" id="post{{ frame.id }}">
251 {% for line in frame.post_context %}
252 <li onclick="toggle('pre{{ frame.id }}', 'post{{ frame.id }}')"><pre>{{ line }}</pre></li>
253 {% endfor %}
254 </ol>
255 {% endif %}
256 </div>
257 {% endif %}
258
259 {% if frame.vars %}
260 <div class="commands">
261 {% if is_email %}
262 <h2>Local Vars</h2>
263 {% else %}
264 <a href="#" onclick="return varToggle(this, '{{ frame.id }}')"><span>&#x25b6;</span> Local vars</a>
265 {% endif %}
266 </div>
267 <table class="vars" id="v{{ frame.id }}">
268 <thead>
269 <tr>
270 <th>Variable</th>
271 <th>Value</th>
272 </tr>
273 </thead>
274 <tbody>
275 {% for var in frame.vars|dictsort:0 %}
276 <tr>
277 <td>{{ var.0 }}</td>
278 <td class="code"><pre>{{ var.1 }}</pre></td>
279 </tr>
280 {% endfor %}
281 </tbody>
282 </table>
283 {% endif %}
284 </li>
285 {% endfor %}
286 </ul>
287 </div>
288 <form action="https://dpaste.de/" name="pasteform" id="pasteform" method="post">
289{% if not is_email %}
290 <div id="pastebinTraceback" class="pastebin">
291 <input type="hidden" name="language" value="PythonConsole">
292 <input type="hidden" name="title"
293 value="{{ exception_type }}{% if request %} at {{ request.path_info }}{% endif %}">
294 <input type="hidden" name="source" value="Django Dpaste Agent">
295 <input type="hidden" name="poster" value="Django">
296 <textarea name="content" id="traceback_area" cols="140" rows="25">
297Environment:
298
299{% if request %}
300Request Method: {{ request.META.REQUEST_METHOD }}
301Request URL: {{ request.get_raw_uri }}
302{% endif %}
303Django Version: {{ django_version_info }}
304Python Version: {{ sys_version_info }}
305Installed Applications:
306{{ settings.INSTALLED_APPS|pprint }}
307Installed Middleware:
308{{ settings.MIDDLEWARE|pprint }}
309
310{% if template_does_not_exist %}Template loader postmortem
311{% if postmortem %}Django tried loading these templates, in this order:
312{% for entry in postmortem %}
313Using engine {{ entry.backend.name }}:
314{% if entry.tried %}{% for attempt in entry.tried %} * {{ attempt.0.loader_name }}: {{ attempt.0.name }} ({{ attempt.1 }})
315{% endfor %}{% else %} This engine did not provide a list of tried templates.
316{% endif %}{% endfor %}
317{% else %}No templates were found because your 'TEMPLATES' setting is not configured.
318{% endif %}{% endif %}{% if template_info %}
319Template error:
320In template {{ template_info.name }}, error at line {{ template_info.line }}
321 {{ template_info.message }}
322{% for source_line in template_info.source_lines %}{% if source_line.0 == template_info.line %} {{ source_line.0 }} : {{ template_info.before }} {{ template_info.during }} {{ template_info.after }}{% else %} {{ source_line.0 }} : {{ source_line.1 }}{% endif %}{% endfor %}{% endif %}
323
324Traceback:{% for frame in frames %}
325{% ifchanged frame.exc_cause %}{% if frame.exc_cause %}{% if frame.exc_cause_explicit %}
326The above exception ({{ frame.exc_cause|force_escape }}) was the direct cause of the following exception:
327{% else %}
328During handling of the above exception ({{ frame.exc_cause|force_escape }}), another exception occurred:
329{% endif %}{% endif %}{% endifchanged %}
330File "{{ frame.filename }}" in {{ frame.function }}
331{% if frame.context_line %} {{ frame.lineno }}. {{ frame.context_line }}{% endif %}{% endfor %}
332
333Exception Type: {{ exception_type }}{% if request %} at {{ request.path_info }}{% endif %}
334Exception Value: {{ exception_value|force_escape }}
335</textarea>
336 <br><br>
337 <input type="submit" value="Share this traceback on dpaste.de">
338 </div>
339</form>
340</div>
341{% endif %}
342{% endif %}
343
344<div id="requestinfo">
345 <h2>Request information</h2>
346
347{% if request %}
348 {% if user_str %}
349 <h3 id="user-info">USER</h3>
350 <p>{{ user_str }}</p>
351 {% endif %}
352
353 <h3 id="get-info">GET</h3>
354 {% if request.GET %}
355 <table class="req">
356 <thead>
357 <tr>
358 <th>Variable</th>
359 <th>Value</th>
360 </tr>
361 </thead>
362 <tbody>
363 {% for k, v in request_GET_items %}
364 <tr>
365 <td>{{ k }}</td>
366 <td class="code"><pre>{{ v|pprint }}</pre></td>
367 </tr>
368 {% endfor %}
369 </tbody>
370 </table>
371 {% else %}
372 <p>No GET data</p>
373 {% endif %}
374
375 <h3 id="post-info">POST</h3>
376 {% if filtered_POST_items %}
377 <table class="req">
378 <thead>
379 <tr>
380 <th>Variable</th>
381 <th>Value</th>
382 </tr>
383 </thead>
384 <tbody>
385 {% for k, v in filtered_POST_items %}
386 <tr>
387 <td>{{ k }}</td>
388 <td class="code"><pre>{{ v|pprint }}</pre></td>
389 </tr>
390 {% endfor %}
391 </tbody>
392 </table>
393 {% else %}
394 <p>No POST data</p>
395 {% endif %}
396 <h3 id="files-info">FILES</h3>
397 {% if request.FILES %}
398 <table class="req">
399 <thead>
400 <tr>
401 <th>Variable</th>
402 <th>Value</th>
403 </tr>
404 </thead>
405 <tbody>
406 {% for k, v in request_FILES_items %}
407 <tr>
408 <td>{{ k }}</td>
409 <td class="code"><pre>{{ v|pprint }}</pre></td>
410 </tr>
411 {% endfor %}
412 </tbody>
413 </table>
414 {% else %}
415 <p>No FILES data</p>
416 {% endif %}
417
418
419 <h3 id="cookie-info">COOKIES</h3>
420 {% if request.COOKIES %}
421 <table class="req">
422 <thead>
423 <tr>
424 <th>Variable</th>
425 <th>Value</th>
426 </tr>
427 </thead>
428 <tbody>
429 {% for k, v in request_COOKIES_items %}
430 <tr>
431 <td>{{ k }}</td>
432 <td class="code"><pre>{{ v|pprint }}</pre></td>
433 </tr>
434 {% endfor %}
435 </tbody>
436 </table>
437 {% else %}
438 <p>No cookie data</p>
439 {% endif %}
440
441 <h3 id="meta-info">META</h3>
442 <table class="req">
443 <thead>
444 <tr>
445 <th>Variable</th>
446 <th>Value</th>
447 </tr>
448 </thead>
449 <tbody>
450 {% for var in request.META.items|dictsort:0 %}
451 <tr>
452 <td>{{ var.0 }}</td>
453 <td class="code"><pre>{{ var.1|pprint }}</pre></td>
454 </tr>
455 {% endfor %}
456 </tbody>
457 </table>
458{% else %}
459 <p>Request data not supplied</p>
460{% endif %}
461
462 <h3 id="settings-info">Settings</h3>
463 <h4>Using settings module <code>{{ settings.SETTINGS_MODULE }}</code></h4>
464 <table class="req">
465 <thead>
466 <tr>
467 <th>Setting</th>
468 <th>Value</th>
469 </tr>
470 </thead>
471 <tbody>
472 {% for var in settings.items|dictsort:0 %}
473 <tr>
474 <td>{{ var.0 }}</td>
475 <td class="code"><pre>{{ var.1|pprint }}</pre></td>
476 </tr>
477 {% endfor %}
478 </tbody>
479 </table>
480
481</div>
482{% if not is_email %}
483 <div id="explanation">
484 <p>
485 You're seeing this error because you have <code>DEBUG = True</code> in your
486 Django settings file. Change that to <code>False</code>, and Django will
487 display a standard page generated by the handler for this status code.
488 </p>
489 </div>
490{% endif %}
491</body>
492</html>
Back to Top