1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #25854 -- Removed deprecated usage of template.render() with RequestContext in docs.

This commit is contained in:
Alasdair Nicol
2015-12-23 21:14:27 +00:00
committed by Tim Graham
parent 5081adcb90
commit 32c7d93e5f
2 changed files with 10 additions and 10 deletions

View File

@@ -72,13 +72,13 @@ MIME type :mimetype:`application/xhtml+xml`::
This example is equivalent to::
from django.http import HttpResponse
from django.template import RequestContext, loader
from django.template import loader
def my_view(request):
# View code here...
t = loader.get_template('myapp/index.html')
c = RequestContext(request, {'foo': 'bar'})
return HttpResponse(t.render(c),
c = {'foo': 'bar'}
return HttpResponse(t.render(c, request),
content_type="application/xhtml+xml")
``render_to_response``