#25963: Docs for render_to_response and context_instance deprecation
-------------------------------------+-------------------------------------
     Reporter:  marktranchant        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Documentation        |                  Version:  1.9
     Severity:  Normal               |               Resolution:
     Keywords:  render,              |             Triage Stage:
  render_to_response,                |  Unreviewed
  context_instance, RequestContext   |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by marktranchant):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> The [https://docs.djangoproject.com/en/1.9/topics/http/shortcuts/#render-
> to-response 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 1.2 so am a fairly old hand yet it
> didn't make sense to me.

New description:

 The [https://docs.djangoproject.com/en/1.9/topics/http/shortcuts/#render-
 to-response 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.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/25963#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.3d0bb27b24ccf741f1e934e1bb739457%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to