diff options
| author | Tim Graham <timograham@gmail.com> | 2015-12-22 10:21:24 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-12-23 10:50:55 -0500 |
| commit | d162b0bcd8367cc2ddf1ccd613a80a2e82c3b262 (patch) | |
| tree | df67425e80a07513cdf654d4ea1afc90e9f190d0 /docs/topics/cache.txt | |
| parent | 2f205e073bbcafc3e2708a0d9c70e0727f9916fb (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.txt | 3 |
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 |
