summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-11-15 18:35:02 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-11-16 21:28:26 +0100
commit2577ae6a082e8a6abc964f999757e908257eafc1 (patch)
tree5909447f0ea74455f9ff8861eb1bc7d6b937d28f /docs/ref
parentcffa55908271bfbce9069b979ab150cd806c6d59 (diff)
Moved all template loaders under django.template.loaders.
Reformatted the code of base.Loader according to modern standards. Turned the test template loader into a regular locmem.Loader -- but didn't document it. Added a normal deprecation path for BaseLoader which is a public API. Added an accelerated deprecation path for TestTemplateLoader which is a private API.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/templates/api.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt
index 08e001b039..6a3f160af3 100644
--- a/docs/ref/templates/api.txt
+++ b/docs/ref/templates/api.txt
@@ -967,11 +967,16 @@ with the Django loading and rendering system!
The next step is to write a ``Loader`` class that returns instances of our custom
template class instead of the default :class:`~django.template.Template`. Custom ``Loader``
-classes should inherit from ``django.template.loader.BaseLoader`` and override
+classes should inherit from ``django.template.loaders.base.Loader`` and override
the ``load_template_source()`` method, which takes a ``template_name`` argument,
loads the template from disk (or elsewhere), and returns a tuple:
``(template_string, template_origin)``.
+.. versionchanged:: 1.8
+
+ ``django.template.loaders.base.Loader`` used to be defined at
+ ``django.template.loader.BaseLoader``.
+
The ``load_template()`` method of the ``Loader`` class retrieves the template
string by calling ``load_template_source()``, instantiates a ``Template`` from
the template source, and returns a tuple: ``(template, template_origin)``. Since