Opened 12 years ago

Closed 12 years ago

Last modified 6 years ago

#18807 closed Cleanup/optimization (fixed)

Inconsistency in the default views

Reported by: Aymeric Augustin Owned by: nobody
Component: Core (Other) Version: dev
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

Description

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 12 years ago.
Removed 404.html and 500.html requirements

Download all attachments as: .zip

Change History (6)

comment:1 by Claude Paroz, 12 years ago

Triage Stage: UnreviewedAccepted

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

by Claude Paroz, 12 years ago

Attachment: 18807-1.diff added

Removed 404.html and 500.html requirements

comment:2 by Claude Paroz, 12 years ago

Has patch: set

comment:3 by Jannis Leidel, 12 years ago

Triage Stage: AcceptedReady for checkin

+1

comment:4 by Claude Paroz <claude@…>, 12 years ago

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
review.

comment:5 by Jon Dufresne <jon.dufresne@…>, 6 years ago

In ff09add2:

Refs #18807 -- Removed unused exception handler from Client.request().

Unused since 8bd7b598b6de1be1e3f72f3a1ee62803b1c02010.

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