1
0
mirror of https://github.com/django/django.git synced 2025-03-12 18:30:48 +00:00

[1.6.x] Fixed #21154 -- Updated TemplateResponse docs to better explain context.

Thanks mrmachine for the report.

Backport of c39c9f2ad8 from master
This commit is contained in:
Curtis Maloney 2013-09-30 20:44:41 +10:00 committed by Tim Graham
parent 0d74bdaf0c
commit 98773c4bb5

View File

@ -139,10 +139,10 @@ TemplateResponse objects
.. class:: TemplateResponse() .. class:: TemplateResponse()
TemplateResponse is a subclass of ``TemplateResponse`` is a subclass of
:class:`~django.template.response.SimpleTemplateResponse` that uses :class:`~django.template.response.SimpleTemplateResponse` that uses
a :class:`~django.template.RequestContext` instead of a :class:`~django.template.RequestContext` instead of
a :class:`~django.template.Context`. a :class:`~django.template.Context`.
Methods Methods
------- -------
@ -162,7 +162,9 @@ Methods
``context`` ``context``
A dictionary of values to add to the template context. By default, A dictionary of values to add to the template context. By default,
this is an empty dictionary. :class:`~django.template.Context` objects 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`` ``status``
The HTTP Status code for the response. The HTTP Status code for the response.