Kaydet (Commit) c39c9f2a authored tarafından Curtis Maloney's avatar Curtis Maloney Kaydeden (comit) Tim Graham

Fixed #21154 -- Updated TemplateResponse docs to better explain context.

Thanks mrmachine for the report.
üst 728548e4
...@@ -132,10 +132,10 @@ TemplateResponse objects ...@@ -132,10 +132,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
------- -------
...@@ -155,7 +155,9 @@ Methods ...@@ -155,7 +155,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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment