#15083 closed (fixed)
TemplateResponse doesn't use custom per-request URLConf
| Reported by: | Russell Keith-Magee | Owned by: | nobody | 
|---|---|---|---|
| Component: | Generic views | Version: | 1.2 | 
| Severity: | Keywords: | blocker | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no | 
| Needs tests: | no | Patch needs improvement: | no | 
| Easy pickings: | no | UI/UX: | no | 
Description
via Sayane on django-dev mailing list:
There is a problem with TemplateResponse and request.urlconf. Custom urlconf is removed[1] before TemplateResponse is rendered. This means that any call to reverse() when rendering template will use default urlconf (from settings). This makes TemplateResponse useless when using custom urlconf.
[1] http://code.djangoproject.com/browser/django/trunk/django/core/handlers/base.py#L166
Change History (3)
comment:1 by , 15 years ago
| Triage Stage: | Unreviewed → Accepted | 
|---|
comment:2 by , 15 years ago
| Resolution: | → fixed | 
|---|---|
| Status: | new → closed | 
  Note:
 See   TracTickets
 for help on using tickets.
    
I suspect the fix here will be to reorganize the logic so that the TemplateResponse is rendered before the URLConf is reset.