Fixed #15530 -- Corrected typo in template loader deprecation message. Thanks to msaelices for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
22347c89d8
commit
17bd34930a
|
@ -141,12 +141,12 @@ def find_template_source(name, dirs=None):
|
||||||
# For backward compatibility
|
# For backward compatibility
|
||||||
import warnings
|
import warnings
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"`django.template.loaders.find_template_source` is deprecated; use `django.template.loaders.find_template` instead.",
|
"`django.template.loader.find_template_source` is deprecated; use `django.template.loader.find_template` instead.",
|
||||||
DeprecationWarning
|
DeprecationWarning
|
||||||
)
|
)
|
||||||
template, origin = find_template(name, dirs)
|
template, origin = find_template(name, dirs)
|
||||||
if hasattr(template, 'render'):
|
if hasattr(template, 'render'):
|
||||||
raise Exception("Found a compiled template that is incompatible with the deprecated `django.template.loaders.find_template_source` function.")
|
raise Exception("Found a compiled template that is incompatible with the deprecated `django.template.loader.find_template_source` function.")
|
||||||
return template, origin
|
return template, origin
|
||||||
|
|
||||||
def get_template(template_name):
|
def get_template(template_name):
|
||||||
|
|
Loading…
Reference in New Issue