Loading django/template/engine.py +1 −12 Original line number Diff line number Diff line Loading @@ -121,18 +121,7 @@ class Engine(object): "instead of django.template.loaders.base.Loader. " % loader, RemovedInDjango20Warning, stacklevel=2) loader_instance = loader_class(*args) if not loader_instance.is_usable: warnings.warn( "Your template loaders configuration includes %r, but " "your Python installation doesn't support that type of " "template loading. Consider removing that line from " "your settings." % loader) return None else: return loader_instance return loader_class(*args) else: raise ImproperlyConfigured( "Invalid value in template loaders configuration: %r" % loader) Loading django/template/loaders/app_directories.py +0 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,6 @@ from .base import Loader as BaseLoader class Loader(BaseLoader): is_usable = True def get_template_sources(self, template_name, template_dirs=None): """ Loading django/template/loaders/base.py +0 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ from django.template.base import Template, TemplateDoesNotExist class Loader(object): is_usable = False # Only used to raise a deprecation warning. Remove in Django 2.0. _accepts_engine_in_init = True Loading django/template/loaders/cached.py +0 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ from .base import Loader as BaseLoader class Loader(BaseLoader): is_usable = True def __init__(self, engine, loaders): self.template_cache = {} Loading django/template/loaders/eggs.py +14 −11 Original line number Diff line number Diff line Loading @@ -14,7 +14,11 @@ from .base import Loader as BaseLoader class Loader(BaseLoader): is_usable = resource_string is not None def __init__(self, engine): if resource_string is None: raise RuntimeError("Setuptools must be installed to use the egg loader") super(Loader, self).__init__(engine) def load_template_source(self, template_name, template_dirs=None): """ Loading @@ -22,7 +26,6 @@ class Loader(BaseLoader): For every installed app, it tries to get the resource (app, template_name). """ if resource_string is not None: pkg_name = 'templates/' + template_name for app_config in apps.get_app_configs(): try: Loading Loading
django/template/engine.py +1 −12 Original line number Diff line number Diff line Loading @@ -121,18 +121,7 @@ class Engine(object): "instead of django.template.loaders.base.Loader. " % loader, RemovedInDjango20Warning, stacklevel=2) loader_instance = loader_class(*args) if not loader_instance.is_usable: warnings.warn( "Your template loaders configuration includes %r, but " "your Python installation doesn't support that type of " "template loading. Consider removing that line from " "your settings." % loader) return None else: return loader_instance return loader_class(*args) else: raise ImproperlyConfigured( "Invalid value in template loaders configuration: %r" % loader) Loading
django/template/loaders/app_directories.py +0 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,6 @@ from .base import Loader as BaseLoader class Loader(BaseLoader): is_usable = True def get_template_sources(self, template_name, template_dirs=None): """ Loading
django/template/loaders/base.py +0 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ from django.template.base import Template, TemplateDoesNotExist class Loader(object): is_usable = False # Only used to raise a deprecation warning. Remove in Django 2.0. _accepts_engine_in_init = True Loading
django/template/loaders/cached.py +0 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ from .base import Loader as BaseLoader class Loader(BaseLoader): is_usable = True def __init__(self, engine, loaders): self.template_cache = {} Loading
django/template/loaders/eggs.py +14 −11 Original line number Diff line number Diff line Loading @@ -14,7 +14,11 @@ from .base import Loader as BaseLoader class Loader(BaseLoader): is_usable = resource_string is not None def __init__(self, engine): if resource_string is None: raise RuntimeError("Setuptools must be installed to use the egg loader") super(Loader, self).__init__(engine) def load_template_source(self, template_name, template_dirs=None): """ Loading @@ -22,7 +26,6 @@ class Loader(BaseLoader): For every installed app, it tries to get the resource (app, template_name). """ if resource_string is not None: pkg_name = 'templates/' + template_name for app_config in apps.get_app_configs(): try: Loading