Debian Codegraph @

django/views/templates/technical_500.html

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