From 98773c4bb53ff464c3782694f244e80158f975ee Mon Sep 17 00:00:00 2001 From: Curtis Maloney Date: Mon, 30 Sep 2013 20:44:41 +1000 Subject: [PATCH] [1.6.x] Fixed #21154 -- Updated TemplateResponse docs to better explain context. Thanks mrmachine for the report. Backport of c39c9f2ad8 from master --- docs/ref/template-response.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/ref/template-response.txt b/docs/ref/template-response.txt index 4f34d150ed..6bd528456b 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.