#25854: Bad warning when using template.render
-------------------------------+--------------------
     Reporter:  stephanm       |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Uncategorized  |    Version:  1.9
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 I am just switchine from django 1.8.7 to 1.9 and stumbled on
 this strange warning.

 I have the similar code snippet in my view as explained in:
 https://docs.djangoproject.com/en/1.9/intro/tutorial03/#write-views-that-
 actually-do-something
 {{{#!py
 ...
 template = loader.get_template('polls/index.html')
 context = RequestContext(request, { })
 return HttpResponse(template.render(context))
 }}}

 Now I get the warning:
 {{{
 RemovedInDjango110Warning: render() must be called with a dict, not a
 RequestContext.
 }}}

 I am not sure how to work around this problem.

 Is it forbidden to use RequestContext in template.render(..)
 if yes, howto must I transform RequestContext in a dict.

 In this case the documentation should be actualized.

 By the way: can I download the tutorial poll application project
 somewhere?

--
Ticket URL: <https://code.djangoproject.com/ticket/25854>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.772cec693d2195d678460de41d7f62e3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to