diff options
Diffstat (limited to 'django/views/templates/technical_404.html')
| -rw-r--r-- | django/views/templates/technical_404.html | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/django/views/templates/technical_404.html b/django/views/templates/technical_404.html index c47dae22af..f2bfe49372 100644 --- a/django/views/templates/technical_404.html +++ b/django/views/templates/technical_404.html @@ -9,9 +9,9 @@ body * { padding:10px 20px; } body * * { padding:0; } body { font:small sans-serif; background:#eee; color:#000; } - body>div { border-bottom:1px solid #ddd; } + body > :where(header, main, footer) { border-bottom:1px solid #ddd; } h1 { font-weight:normal; margin-bottom:.4em; } - h1 span { font-size:60%; color:#666; font-weight:normal; } + h1 small { font-size:60%; color:#666; font-weight:normal; } table { border:none; border-collapse: collapse; width:100%; } td, th { vertical-align:top; padding:2px 3px; } th { width:12em; text-align:right; color:#666; padding-right:.5em; } @@ -24,27 +24,28 @@ </style> </head> <body> - <div id="summary"> - <h1>Page not found <span>(404)</span></h1> + <header id="summary"> + <h1>Page not found <small>(404)</small></h1> {% if reason and resolved %}<pre class="exception_value">{{ reason }}</pre>{% endif %} <table class="meta"> <tr> - <th>Request Method:</th> + <th scope="row">Request Method:</th> <td>{{ request.META.REQUEST_METHOD }}</td> </tr> <tr> - <th>Request URL:</th> + <th scope="row">Request URL:</th> <td>{{ request.build_absolute_uri }}</td> </tr> {% if raising_view_name %} <tr> - <th>Raised by:</th> + <th scope="row">Raised by:</th> <td>{{ raising_view_name }}</td> </tr> {% endif %} </table> - </div> - <div id="info"> + </header> + + <main id="info"> {% if urlpatterns %} <p> Using the URLconf defined in <code>{{ urlconf }}</code>, @@ -54,8 +55,10 @@ {% for pattern in urlpatterns %} <li> {% for pat in pattern %} + <code> {{ pat.pattern }} {% if forloop.last and pat.name %}[name='{{ pat.name }}']{% endif %} + </code> {% endfor %} </li> {% endfor %} @@ -69,14 +72,14 @@ {% if resolved %}matched the last one.{% else %}didn’t match any of these.{% endif %} </p> {% endif %} - </div> + </main> - <div id="explanation"> + <footer id="explanation"> <p> You’re seeing this error because you have <code>DEBUG = True</code> in your Django settings file. Change that to <code>False</code>, and Django will display a standard 404 page. </p> - </div> + </footer> </body> </html> |
