summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/template-response.txt7
-rw-r--r--docs/releases/1.8.txt14
2 files changed, 18 insertions, 3 deletions
diff --git a/docs/ref/template-response.txt b/docs/ref/template-response.txt
index 7f0ddcf58d..bfee0e29af 100644
--- a/docs/ref/template-response.txt
+++ b/docs/ref/template-response.txt
@@ -287,9 +287,10 @@ invoked immediately.
Using TemplateResponse and SimpleTemplateResponse
=================================================
-A TemplateResponse object can be used anywhere that a normal
-HttpResponse can be used. It can also be used as an alternative to
-calling :func:`~django.shortcuts.render_to_response()`.
+A TemplateResponse object can be used anywhere that a normal HttpResponse can be
+used. It can also be used as an alternative to calling
+:func:`~django.shortcuts.render()` or
+:func:`~django.shortcuts.render_to_response()`.
For example, the following simple view returns a
:class:`TemplateResponse()` with a simple template, and a context
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index 4334408db7..dda798f0a2 100644
--- a/docs/releases/1.8.txt
+++ b/docs/releases/1.8.txt
@@ -640,6 +640,20 @@ run this query::
the serialization framework, that means that ``dumpdata`` output will now
contain the SRID value of geometry objects.
+Priority of context processors for ``TemplateResponse`` brought in line with ``render``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The :class:`~django.template.response.TemplateResponse` constructor is designed to be a
+drop-in replacement for the :func:`~django.shortcuts.render` function. However,
+it had a slight incompatibility, in that for ``TemplateResponse``, context data
+from the passed in context dictionary could be shadowed by context data returned
+from context processors, whereas for ``render`` it was the other way
+around. This was a bug, and the behaviour of ``render`` is more appropriate,
+since it allows the globally defined context processors to be overridden locally
+in the view. If you were relying on the fact context data in a
+``TemplateResponse`` could be overridden using a context processor, you will
+need to change your code.
+
Miscellaneous
~~~~~~~~~~~~~