Refactored getting the list of template loaders.

This provides the opportunity to move utility functions specific to the
Django Template Language outside of django.template.loader.
This commit is contained in:
Aymeric Augustin 2014-11-15 20:58:26 +01:00
parent 1851dcf377
commit 9eeb788cfb
8 changed files with 102 additions and 93 deletions

View file

@ -22,6 +22,7 @@ except ImportError:
from django.template import TemplateDoesNotExist, Context
from django.template.loaders.eggs import Loader as EggLoader
from django.template.loaders.utils import find_template_loader
from django.template import loader
from django.test import TestCase, override_settings
from django.utils import six
@ -127,7 +128,7 @@ class CachedLoader(TestCase):
def test_missing_template_is_cached(self):
"#19949 -- Check that the missing template is cached."
template_loader = loader.find_template_loader(settings.TEMPLATE_LOADERS[0])
template_loader = find_template_loader(settings.TEMPLATE_LOADERS[0])
# Empty cache, which may be filled from previous tests.
template_loader.reset()
# Check that 'missing.html' isn't already in cache before 'missing.html' is loaded