Loading django/template/loader.py +6 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,12 @@ def find_template_loader(loader): if hasattr(TemplateLoader, 'load_template_source'): func = TemplateLoader(*args) else: warnings.warn( "Function-based template loaders are deprecated. Please use " "class-based template loaders instead. Inherit base.Loader " "and provide a load_template_source() method.", RemovedInDjango20Warning, stacklevel=2) # Try loading module the old way - string is full path to callable if args: raise ImproperlyConfigured( Loading docs/internals/deprecation.txt +2 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,8 @@ details on these changes. * The backwards compatibility alias ``django.template.loader.BaseLoader`` will be removed. * Support for function-based template loaders will be removed. .. _deprecation-removed-in-1.9: 1.9 Loading docs/releases/1.8.txt +7 −0 Original line number Diff line number Diff line Loading @@ -1040,6 +1040,13 @@ class decorators. As a consequence, when overriding ``setUpClass()`` or ``django.template.loaders.base.Loader``. If you've written a custom template loader that inherits ``BaseLoader``, you must inherit ``Loader`` instead. Function-based template loaders ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In addition to the documented class-based API for custom template loaders, Django still supported to some extent an earlier function-based API. This private API wasn't maintained or tested. Now it's formally deprecated. ``django.test.utils.TestTemplateLoader`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loading Loading
django/template/loader.py +6 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,12 @@ def find_template_loader(loader): if hasattr(TemplateLoader, 'load_template_source'): func = TemplateLoader(*args) else: warnings.warn( "Function-based template loaders are deprecated. Please use " "class-based template loaders instead. Inherit base.Loader " "and provide a load_template_source() method.", RemovedInDjango20Warning, stacklevel=2) # Try loading module the old way - string is full path to callable if args: raise ImproperlyConfigured( Loading
docs/internals/deprecation.txt +2 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,8 @@ details on these changes. * The backwards compatibility alias ``django.template.loader.BaseLoader`` will be removed. * Support for function-based template loaders will be removed. .. _deprecation-removed-in-1.9: 1.9 Loading
docs/releases/1.8.txt +7 −0 Original line number Diff line number Diff line Loading @@ -1040,6 +1040,13 @@ class decorators. As a consequence, when overriding ``setUpClass()`` or ``django.template.loaders.base.Loader``. If you've written a custom template loader that inherits ``BaseLoader``, you must inherit ``Loader`` instead. Function-based template loaders ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In addition to the documented class-based API for custom template loaders, Django still supported to some extent an earlier function-based API. This private API wasn't maintained or tested. Now it's formally deprecated. ``django.test.utils.TestTemplateLoader`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loading