technical_404.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=utf-8">
  5. <title>Page not found at {{ request.path_info }}</title>
  6. <meta name="robots" content="NONE,NOARCHIVE">
  7. <style type="text/css">
  8. html * { padding:0; margin:0; }
  9. body * { padding:10px 20px; }
  10. body * * { padding:0; }
  11. body { font:small sans-serif; background:#eee; color:#000; }
  12. body > :where(header, main, footer) { border-bottom:1px solid #ddd; }
  13. h1 { font-weight:normal; margin-bottom:.4em; }
  14. h1 small { font-size:60%; color:#666; font-weight:normal; }
  15. table { border:none; border-collapse: collapse; width:100%; }
  16. td, th { vertical-align:top; padding:2px 3px; }
  17. th { width:12em; text-align:right; color:#666; padding-right:.5em; }
  18. #info { background:#f6f6f6; }
  19. #info ol { margin: 0.5em 4em; }
  20. #info ol li { font-family: monospace; }
  21. #summary { background: #ffc; }
  22. #explanation { background:#eee; border-bottom: 0px none; }
  23. pre.exception_value { font-family: sans-serif; color: #575757; font-size: 1.5em; margin: 10px 0 10px 0; }
  24. </style>
  25. </head>
  26. <body>
  27. <header id="summary">
  28. <h1>Page not found <small>(404)</small></h1>
  29. {% if reason and resolved %}<pre class="exception_value">{{ reason }}</pre>{% endif %}
  30. <table class="meta">
  31. <tr>
  32. <th scope="row">Request Method:</th>
  33. <td>{{ request.META.REQUEST_METHOD }}</td>
  34. </tr>
  35. <tr>
  36. <th scope="row">Request URL:</th>
  37. <td>{{ request.build_absolute_uri }}</td>
  38. </tr>
  39. {% if raising_view_name %}
  40. <tr>
  41. <th scope="row">Raised by:</th>
  42. <td>{{ raising_view_name }}</td>
  43. </tr>
  44. {% endif %}
  45. </table>
  46. </header>
  47. <main id="info">
  48. {% if urlpatterns %}
  49. <p>
  50. Using the URLconf defined in <code>{{ urlconf }}</code>,
  51. Django tried these URL patterns, in this order:
  52. </p>
  53. <ol>
  54. {% for pattern in urlpatterns %}
  55. <li>
  56. {% for pat in pattern %}
  57. <code>
  58. {{ pat.pattern }}
  59. {% if forloop.last and pat.name %}[name='{{ pat.name }}']{% endif %}
  60. </code>
  61. {% endfor %}
  62. </li>
  63. {% endfor %}
  64. </ol>
  65. <p>
  66. {% if request_path %}
  67. The current path, <code>{{ request_path }}</code>,
  68. {% else %}
  69. The empty path
  70. {% endif %}
  71. {% if resolved %}matched the last one.{% else %}didn’t match any of these.{% endif %}
  72. </p>
  73. {% endif %}
  74. </main>
  75. <footer id="explanation">
  76. <p>
  77. You’re seeing this error because you have <code>DEBUG = True</code> in
  78. your Django settings file. Change that to <code>False</code>, and Django
  79. will display a standard 404 page.
  80. </p>
  81. </footer>
  82. </body>
  83. </html>