#21580 closed Cleanup/optimization (fixed)
Unclear why shortcut function "render" can not return TemplateResponse object
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
The reason is - apparently - that this is pointless as TemplateResponse has a constructor with a syntax equivalently convenient as render().
I have created a pull request and I suggest to update the documentation accordingly. I was confused by the fact that TemplateResponse is not even mentioned in the shortcut section, although using it should be a rather common thing. It gives the impression that TemplateResponse is a "2nd class citizen".
Here's a link to the pull request: https://github.com/django/django/pull/2053
Change History (3)
comment:1 by , 11 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
In f685f94c9867461a7838a56b2c2adbec984eee7e: