Inconsistency in the default views
django.views.defaults.permission_denied
will respond
<h1>403 Forbidden</h1>
if no
403.html
template is found. This behavior was introduced to provide backwards compatibility. Generally speaking, it is a reasonable fallback.
I believe that page_not_found
and server_error
could benefit from a similar fallback.
That would prevent 404s from turning into 500s when there's no 404.html template. I know we want to encourage custom error pages, but in case a developer skips them, a bare
<h1>404 Not Found</h1>
is less damaging than a 500 with a backtrace or no content at all.
Change History
(6)
Triage Stage: |
Unreviewed → Accepted
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
#18948 demonstrates a bad side-effect of the current situation.