mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Refs #15053 -- Removed support for non-recursive template loading.
Per deprecation timeline.
This commit is contained in:
parent
56a5760543
commit
5d8da093a9
12 changed files with 40 additions and 422 deletions
|
@ -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`_.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue