diff options
| author | Curtis Maloney <curtis@tinbrain.net> | 2013-09-30 20:44:41 +1000 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-09-30 10:19:56 -0400 |
| commit | c39c9f2ad8b2670d53ef845face67c29f3f4be3b (patch) | |
| tree | ed04cdf7cae5bcc993255b395ac1be3efa4dacbc /docs/ref | |
| parent | 728548e483a5a3486939b0c8e62520296587482e (diff) | |
Fixed #21154 -- Updated TemplateResponse docs to better explain context.
Thanks mrmachine for the report.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/template-response.txt | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/ref/template-response.txt b/docs/ref/template-response.txt index 47c012e12a..150ebc73d9 100644 --- a/docs/ref/template-response.txt +++ b/docs/ref/template-response.txt @@ -132,10 +132,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 ------- @@ -155,7 +155,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. |
