1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Supported multiple template engines in render_to_string.

Adjusted its API through a deprecation path according to the DEP.
This commit is contained in:
Aymeric Augustin
2014-11-28 23:50:34 +01:00
parent f9a6ebf6f5
commit 90805b240f
7 changed files with 146 additions and 27 deletions

View File

@@ -1198,6 +1198,20 @@ to construct the "view on site" URL. This URL is now accessible using the
sure to provide a default value for the ``form_class`` argument since it's
now optional.
``dictionary`` and ``context_instance`` arguments of rendering functions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following functions will no longer accept the ``dictionary`` and
``context_instance`` parameters in Django 2.0:
* ``django.template.loader.render_to_string()``
Use the ``context`` parameter instead. When ``dictionary`` is passed as a
positional argument, which is the most common idiom, no changes are needed.
There is no replacement for ``context_instance``. All data must be passed to
templates through the ``context`` dict.
``dirs`` argument of template-finding functions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~