Opened 3 years ago

Closed 3 years ago

#18807 closed Cleanup/optimization (fixed)

Inconsistency in the default views

Reported by: aaugustin 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 claudep 3 years ago.
Removed 404.html and 500.html requirements

Download all attachments as: .zip

Change History (5)

comment:1 Changed 3 years ago by claudep

  • Triage Stage changed from Unreviewed to Accepted

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

Changed 3 years ago by claudep

Removed 404.html and 500.html requirements

comment:2 Changed 3 years ago by claudep

  • Has patch set

comment:3 Changed 3 years ago by jezdez

  • Triage Stage changed from Accepted to Ready for checkin


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

  • Resolution set to fixed
  • Status changed from new to closed

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