Opened 7 years ago

Closed 6 years ago

Last modified 5 years ago

#11990 closed (fixed)

TECHNICAL_404_TEMPLATE doesn't see URLConfs directly on request objects

Reported by: mattbennett Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords: 404, urlconf, debug, template
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


The default debug 404 template in django/views/ assumes that the urlconf searched was the root urlconf. Since [4237] the urlconf can be set by middleware, so this is not necessarily the case.

The attached patch puts the module name of the urlconf being used into the template context, and modifies the template accordingly.

Attachments (1)

technical_404_urlconf.patch (1.3 KB) - added by mattbennett 7 years ago.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by mattbennett

Attachment: technical_404_urlconf.patch added

comment:1 Changed 7 years ago by Russell Keith-Magee

milestone: 1.2
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 7 years ago by Russell Keith-Magee

milestone: 1.21.3
Triage Stage: AcceptedReady for checkin

comment:3 Changed 6 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

(In [14877]) Fixed #11990 -- Show the correct URLconf in the technical 404 template even if it was overridden, e.g. in a middleware. Thanks, mattbennett.

comment:4 Changed 5 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

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