Opened 6 years ago

Closed 4 years ago

Last modified 4 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:

Description

The default debug 404 template in django/views/debug.py 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 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by mattbennett

comment:1 Changed 5 years ago by russellm

  • milestone set to 1.2
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 5 years ago by russellm

  • milestone changed from 1.2 to 1.3
  • Triage Stage changed from Accepted to Ready for checkin

comment:3 Changed 4 years ago by jezdez

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

(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 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

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