Opened 6 years ago

Closed 6 years ago

#18807 closed Cleanup/optimization (fixed)

Inconsistency in the default views

Reported by: Aymeric Augustin Owned by: nobody
Component: Core (Other) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


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.

Attachments (1)

18807-1.diff (12.2 KB) - added by Claude Paroz 6 years ago.
Removed 404.html and 500.html requirements

Download all attachments as: .zip

Change History (5)

comment:1 Changed 6 years ago by Claude Paroz

Triage Stage: UnreviewedAccepted

#18948 demonstrates a bad side-effect of the current situation.

Changed 6 years ago by Claude Paroz

Attachment: 18807-1.diff added

Removed 404.html and 500.html requirements

comment:2 Changed 6 years ago by Claude Paroz

Has patch: set

comment:3 Changed 6 years ago by Jannis Leidel

Triage Stage: AcceptedReady for checkin


comment:4 Changed 6 years ago by Claude Paroz <claude@…>

Resolution: fixed
Status: newclosed

In 8bd7b598b6de1be1e3f72f3a1ee62803b1c02010:

Fixed #18807 -- Made 404.html and 500.html optional

Thanks Aymeric Augustin for the report and Jannis Leidel for the

Note: See TracTickets for help on using tickets.
Back to Top