summaryrefslogtreecommitdiff
path: root/docs/topics/cache.txt
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-12-22 10:21:24 -0500
committerTim Graham <timograham@gmail.com>2015-12-23 10:50:55 -0500
commitd162b0bcd8367cc2ddf1ccd613a80a2e82c3b262 (patch)
treedf67425e80a07513cdf654d4ea1afc90e9f190d0 /docs/topics/cache.txt
parent2f205e073bbcafc3e2708a0d9c70e0727f9916fb (diff)
[1.9.x] Fixed #25969 -- Replaced render_to_response() with render() in docs examples.
Backport of 4d83b0163e15f8352fd17fa121e929842ff2b686 from master
Diffstat (limited to 'docs/topics/cache.txt')
-rw-r--r--docs/topics/cache.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt
index 7c94c789c4..1a860a71e3 100644
--- a/docs/topics/cache.txt
+++ b/docs/topics/cache.txt
@@ -1114,11 +1114,12 @@ The headers you pass to ``vary_on_headers`` are not case sensitive;
You can also use a helper function, :func:`django.utils.cache.patch_vary_headers`,
directly. This function sets, or adds to, the ``Vary header``. For example::
+ from django.shortcuts import render
from django.utils.cache import patch_vary_headers
def my_view(request):
# ...
- response = render_to_response('template_name', context)
+ response = render(request, 'template_name', context)
patch_vary_headers(response, ['Cookie'])
return response