summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-10-30 18:34:10 -0400
committerTim Graham <timograham@gmail.com>2014-10-30 18:35:15 -0400
commit01119c9c0f17387d2046bbd700835d85330d5151 (patch)
treedb933824a91050cd7d3b493f016479538bd24c1e /docs
parentee2e09864d40f9781bf38d8048b1ddeb56baa089 (diff)
[1.7.x] Fixed #23737 -- Recommended the render() shortcut more strongly.
Thanks Aymeric Augustin for the report. Backport of f85fcc75e3 from master
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/templates/api.txt21
1 files changed, 2 insertions, 19 deletions
diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt
index 2c8abe22ae..294e3a6b67 100644
--- a/docs/ref/templates/api.txt
+++ b/docs/ref/templates/api.txt
@@ -504,26 +504,9 @@ optional, third positional argument, ``processors``. In this example, the
shortcut to populate a template with the contents of a dictionary, your
template will be passed a ``Context`` instance by default (not a
``RequestContext``). To use a ``RequestContext`` in your template
- rendering, pass an optional third argument to
- :func:`~django.shortcuts.render_to_response()`: a ``RequestContext``
- instance. Your code might look like this::
-
- from django.shortcuts import render_to_response
- from django.template import RequestContext
-
- def some_view(request):
- # ...
- return render_to_response('my_template.html',
- my_data_dictionary,
- context_instance=RequestContext(request))
-
- Alternatively, use the :meth:`~django.shortcuts.render()` shortcut which is
+ rendering, use the :meth:`~django.shortcuts.render()` shortcut which is
the same as a call to :func:`~django.shortcuts.render_to_response()` with a
- context_instance argument that forces the use of a ``RequestContext``.
-
- Note that the contents of a supplied dictionary (``my_data_dictionary``
- in this example) will take precedence over any variables supplied by
- context processors or the ``RequestContext``.
+ ``context_instance`` argument that forces the use of a ``RequestContext``.
Here's what each of the default processors does: