#29639: Fault in the documentation around usage of Context versus dict
-------------------------------------+-------------------------------------
               Reporter:             |          Owner:  nobody
  JeroenPeterBos                     |
                   Type:  Bug        |         Status:  new
              Component:             |        Version:  2.1
  Documentation                      |
               Severity:  Normal     |       Keywords:  Deprecated Usage
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 **Problem**
 In the documentation on the following page there is a mistake:
 
[https://docs.djangoproject.com/en/2.1/ref/templates/api/#django.template.Template.render]

 Under ''Rendering a context'' -> ''Template.render(context)'' it is
 demonstrated how to render a context onto a template.
 However doing this results in the error: ''TypeError: context must be a
 dict rather than Context.''

 I have found that this usage of the ''Context'' class is deprecated in
 Django 1.10+.

 **Solution**
 The documentation regarding ''Rendering a Context'' should be updated to
 insert a dictionary instead of first creating a Context and passing that
 to the ''render'' function.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29639>
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/057.96fda8142bc2a1877aed19e3959ed068%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to