#15010 closed (fixed)
TemplateResponse: add current_app parameter for RequestContext
| Reported by: | Chris Adams | Owned by: | Chris Adams |
|---|---|---|---|
| Component: | Template system | Version: | dev |
| Severity: | Keywords: | blocker | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | yes |
| Needs tests: | no | Patch needs improvement: | yes |
| Easy pickings: | no | UI/UX: | no |
Description
#15008 converts admin to return TemplateResponse instances. The patch is complicated by the fact that we still have to create RequestContext instances manually to set current_app in many places. This branch / patch changes TemplateResponse to pass through the current_app value when creating a RequestContext instance dynamically:
https://github.com/acdha/django/compare/master...template-response-current_app
https://github.com/acdha/django/compare/master...template-response-current_app.patch
Attachments (3)
Change History (10)
comment:1 by , 15 years ago
| Needs documentation: | set |
|---|---|
| Patch needs improvement: | set |
| Triage Stage: | Unreviewed → Accepted |
follow-up: 4 comment:2 by , 15 years ago
| Owner: | changed from to |
|---|
Added the render shortcut and some basic documentation here, which is the commit used for the updated patch:
https://github.com/acdha/django/commit/d1024ace8965230d5eac7d2a7a8cefeeefc3b36d
Do you have any suggestions for further improvements?
Also, at this point, I should assume that it's safe to update #15008 to assume that this change will be included, right?
by , 15 years ago
| Attachment: | template-response-current_app.2.txt added |
|---|
by , 15 years ago
| Attachment: | template-response-current_app.txt added |
|---|
by , 15 years ago
| Attachment: | template-response-current_app.patch added |
|---|
comment:4 by , 15 years ago
comment:5 by , 15 years ago
| Keywords: | blocker added |
|---|
comment:6 by , 15 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Good catch. For the record, the same problem exists with the render() shortcut. Marking needs improvement so that we can roll that fix into the same commit.
Also requires docs.
Since this is a functional flaw in a 1.3 feature, this should be a 1.3 blocker.