Opened 9 years ago
Closed 9 years ago
#25695 closed New feature (fixed)
csrf_failure view should take a template parameter
Reported by: | Raphael Michel | Owned by: | Raphael Michel |
---|---|---|---|
Component: | Uncategorized | 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
The default CSRF failure view (django.views.csrf.csrf_failure
) should take an optional template
parameter, just as the HTTP error views (e.g. django.views.defaults.page_not_found
) do to make it easier to overwrite the view while retaining the template rendering context of the default view.
Currently, it is necessary to copy over the view to your own codebase, which is very unclean.
I will prepare a pull request for this ticket if it gets accepted.
Change History (4)
comment:1 by , 9 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 9 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
I'd love to hear some feedback.
comment:3 by , 9 years ago
Triage Stage: | Accepted → Ready for checkin |
---|---|
Version: | 1.8 → master |
Patch LGTM.
Sounds sensible, especially if pages like to integrate the CSRF error page with the style of their homepage