diff options
| author | Alasdair Nicol <alasdair@thenicols.net> | 2015-12-23 21:14:27 +0000 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-12-23 18:31:20 -0500 |
| commit | 8eeb01a7022d807189f964864cb068d48b7a3390 (patch) | |
| tree | 8c6da587a9eb436bbef4cf794065d2406223127a /docs/topics/http | |
| parent | dac48234d3bd28a4c4a0f78830d77bddad471cfd (diff) | |
[1.9.x] Fixed #25854 -- Removed deprecated usage of template.render() with RequestContext in docs.
Backport of 32c7d93e5f0638c5a1ec8e2525c967be444fcef1 from master
Diffstat (limited to 'docs/topics/http')
| -rw-r--r-- | docs/topics/http/shortcuts.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/topics/http/shortcuts.txt b/docs/topics/http/shortcuts.txt index 0733140e6f..7583a5b573 100644 --- a/docs/topics/http/shortcuts.txt +++ b/docs/topics/http/shortcuts.txt @@ -104,13 +104,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`` |
