#25963 closed Bug (fixed)
Clarify docs for render_to_response and context_instance deprecation
Reported by: | Mark Tranchant | Owned by: | Tim Graham |
---|---|---|---|
Component: | Documentation | Version: | 1.9 |
Severity: | Normal | Keywords: | render, render_to_response, context_instance, RequestContext |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
The render_to_response() documentation notes the deprecation of the context_instance
argument:
"Deprecated since version 1.8: The context_instance
argument is deprecated. Simply use context
."
This advice is singularly unhelpful — it took me a fair amount of StackOverflow searching to work out what to do. I use the RequestContext
to handle user messages and authorization, so it's essential for my project.
I'd suggest the note should read:
"Deprecated since version 1.8: The context_instance
argument is deprecated. Simply use render()
with the request
as the first argument."
I don't know if that covers all use cases for the deprecation notice: if not, the original should be expanded to provide a better explanation. I've dragged my project along since 0.96 so am a fairly old hand yet it didn't make sense to me.
Change History (9)
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Summary: | Docs for render_to_response and context_instance deprecation → Clarify docs for render_to_response and context_instance deprecation |
comment:7 by , 9 years ago
Thanks, that's much clearer now. Should help other people in my position with older code being forced to update by the deprecation timeline.
Indeed, this seems to trip up people regularly.
I mistakenly assumed that in 2015 everyone would be lazy enough to use
render()