1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Accounted for multiple template engines in template responses.

This commit is contained in:
Aymeric Augustin
2015-01-09 22:59:00 +01:00
parent a3e783fe11
commit 79deb6a071
11 changed files with 215 additions and 111 deletions

View File

@@ -1397,6 +1397,21 @@ Since it's easier to understand with examples, the :ref:`upgrade guide
All this also applies to :func:`~django.template.loader.select_template()`.
:class:`~django.template.Template` and :class:`~django.template.Context` classes in template responses
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Some methods of :class:`~django.template.response.SimpleTemplateResponse` and
:class:`~django.template.response.TemplateResponse` accepted
:class:`django.template.Context` and :class:`django.template.Template` objects
as arguments. They should now receive :class:`dict` and backend-dependent
template objects respectively.
This also applies to the return types if you have subclassed either template
response class.
Check the :doc:`template response API documentation </ref/template-response>`
for details.
``current_app`` argument of template-related APIs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~