1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

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.
This commit is contained in:
Aymeric Augustin
2014-11-15 18:35:02 +01:00
parent cffa559082
commit 2577ae6a08
12 changed files with 125 additions and 64 deletions

View File

@@ -221,7 +221,7 @@ class TemplateLoaderTests(TestCase):
# We rely on the fact that runtests.py sets up TEMPLATE_DIRS to
# point to a directory containing a login.html file. Also that
# the file system and app directories loaders both inherit the
# load_template method from the BaseLoader class, so we only need
# load_template method from the base Loader class, so we only need
# to test one of them.
load_name = 'login.html'
template = loader.get_template(load_name)
@@ -306,7 +306,7 @@ class TemplateLoaderTests(TestCase):
def test_extends_include_missing_cachedloader(self):
"""
Same as test_extends_include_missing_baseloader, only tests
behavior of the cached loader instead of BaseLoader.
behavior of the cached loader instead of base loader.
"""
cache_loader = cached.Loader(('',))
cache_loader._cached_loaders = (app_directories.Loader(),)