Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.5.x] Fixed #21154 -- Updated TemplateResponse docs to better expla…

…in context.

Thanks mrmachine for the report.

Backport of c39c9f2 from master
  • Loading branch information...
commit 20f394f4d5a5e0b4647aac2dd7b5ab8dc89d36fa 1 parent 73ffe26
@funkybob funkybob authored timgraham committed
Showing with 7 additions and 5 deletions.
  1. +7 −5 docs/ref/template-response.txt
View
12 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.
Please sign in to comment.
Something went wrong with that request. Please try again.