Refs #15053 -- Removed support for non-recursive template loading.

Per deprecation timeline.
This commit is contained in:
Tim Graham 2016-12-30 20:09:26 -05:00
parent 56a5760543
commit 5d8da093a9
12 changed files with 40 additions and 422 deletions

View file

@ -1057,37 +1057,6 @@ Loader methods
:meth:`get_contents` for custom template loaders. ``get_template()``
will usually not need to be overridden.
.. method:: load_template_source(template_name, template_dirs=None)
Returns a tuple of (``template_string``, ``template_origin``), where
``template_string`` is a string containing the template contents,
and ``template_origin`` is a string identifying the template source.
A filesystem-based loader may return the full path to the file as the
``template_origin``, for example.
``template_dirs`` is an optional argument used to control which
directories the loader will search.
This method is called automatically by :meth:`load_template` and should
be overridden when writing custom template loaders.
.. deprecated:: 1.9
Custom loaders should use :meth:`get_template` and
:meth:`get_contents` instead.
.. method:: load_template(template_name, template_dirs=None)
Returns a tuple of (``template``, ``template_origin``), where ``template``
is a ``Template`` object and ``template_origin`` is a string identifying
the template source. A filesystem-based loader may return the full
path to the file as the ``template_origin``, for example.
.. deprecated:: 1.9
Custom loaders should use :meth:`get_template` and
:meth:`get_contents` instead.
.. admonition:: Building your own
For examples, `read the source code for Django's built-in loaders`_.