summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorCurtis Maloney <curtis@tinbrain.net>2013-09-30 20:44:41 +1000
committerTim Graham <timograham@gmail.com>2013-09-30 10:21:40 -0400
commit20f394f4d5a5e0b4647aac2dd7b5ab8dc89d36fa (patch)
treefeee2501939ef09e328b994eda96a1dce6157de0 /docs/ref
parent73ffe26816738c15515e5764e96c056f0d98559a (diff)
[1.5.x] Fixed #21154 -- Updated TemplateResponse docs to better explain context.
Thanks mrmachine for the report. Backport of c39c9f2ad8 from master
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/template-response.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/ref/template-response.txt b/docs/ref/template-response.txt
index 5c13ec7d96..908b67fcea 100644
--- a/docs/ref/template-response.txt
+++ b/docs/ref/template-response.txt
@@ -139,10 +139,10 @@ TemplateResponse objects
.. class:: TemplateResponse()
- TemplateResponse is a subclass of
- :class:`~django.template.response.SimpleTemplateResponse` that uses
- a :class:`~django.template.RequestContext` instead of
- a :class:`~django.template.Context`.
+ ``TemplateResponse`` is a subclass of
+ :class:`~django.template.response.SimpleTemplateResponse` that uses
+ a :class:`~django.template.RequestContext` instead of
+ a :class:`~django.template.Context`.
Methods
-------
@@ -162,7 +162,9 @@ Methods
``context``
A dictionary of values to add to the template context. By default,
this is an empty dictionary. :class:`~django.template.Context` objects
- are also accepted as ``context`` values.
+ are also accepted as ``context`` values. If you pass a
+ :class:`~django.template.Context` instance or subclass, it will be used
+ instead of creating a new :class:`~django.template.RequestContext`.
``status``
The HTTP Status code for the response.