#33702: Make request available to custom 500 and 400 templates
-------------------------------+--------------------------------------
Reporter: Andrew | Owner: Andrew
Type: New feature | Status: closed
Component: HTTP handling | Version: 4.0
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):
* status: assigned => closed
* has_patch: 1 => 0
* resolution: => wontfix
Comment:
Django deliberately doesn't pass a `request` objects when rendering 400
and 500 error pages. It's recommended to keep them as simple as possible
and don't e.g. interact with the database (see #22011) or do anything that
might cause further errors. You can always
[https://docs.djangoproject.com/en/stable/topics/http/views/#customizing-
error-views-1 customize error views] in your app and pass a `request`
objects to templates, but my advise is to avoid it.
You can also start a discussion on DevelopersMailingList if you don't
agree.
--
Ticket URL: <https://code.djangoproject.com/ticket/33702#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070180bba990b6-5cbbec94-7d28-4ab9-8d7e-58665254d942-000000%40eu-central-1.amazonses.com.