Deprecated dirs argument to override TEMPLATE_DIRS.

Cancels 2f0566fa. Refs #4278.
This commit is contained in:
Aymeric Augustin 2014-11-13 20:25:08 +01:00
parent bcb693ebd4
commit 17012b6936
6 changed files with 68 additions and 36 deletions

View file

@ -659,25 +659,27 @@ The Python API
the template with the given name. If the template doesn't exist, it raises
``django.template.TemplateDoesNotExist``.
To override the :setting:`TEMPLATE_DIRS` setting, use the ``dirs``
parameter. The ``dirs`` parameter may be a tuple or list.
.. versionchanged:: 1.7
The ``dirs`` parameter was added.
.. versionchanged:: 1.8
The ``dirs`` parameter was deprecated.
.. function:: select_template(template_name_list[, dirs])
``select_template`` is just like ``get_template``, except it takes a list
of template names. Of the list, it returns the first template that exists.
To override the :setting:`TEMPLATE_DIRS` setting, use the ``dirs``
parameter. The ``dirs`` parameter may be a tuple or list.
.. versionchanged:: 1.7
The ``dirs`` parameter was added.
.. versionchanged:: 1.8
The ``dirs`` parameter was deprecated.
For example, if you call ``get_template('story_detail.html')`` and have the
above :setting:`TEMPLATE_DIRS` setting, here are the files Django will look for,
in order: