mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
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:
parent
1851dcf377
commit
9eeb788cfb
8 changed files with 102 additions and 93 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue