diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-11-15 19:55:53 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-11-16 21:41:42 +0100 |
| commit | 1851dcf377d05a5d167cf482674e4c4a4e2502a5 (patch) | |
| tree | 8eb977a5a3fe325cc2d6a2d064153ed7dc9ebb26 /django/template | |
| parent | 0bf99193f88238aea0a12970503a7b5dceb206ec (diff) | |
Deprecated function-based loaders.
Diffstat (limited to 'django/template')
| -rw-r--r-- | django/template/loader.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/django/template/loader.py b/django/template/loader.py index 3fe4773894..c62c383322 100644 --- a/django/template/loader.py +++ b/django/template/loader.py @@ -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( |
