Kaydet (Commit) 7d553c06 authored tarafından Adrian Holovaty's avatar Adrian Holovaty

Improved TemplateDoesNotExist error message in django.core.template_file

git-svn-id: http://code.djangoproject.com/svn/django/trunk@194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 3ab57913
......@@ -15,4 +15,8 @@ def load_template_source(template_name, template_dirs=None):
return open(filepath).read()
except IOError:
tried.append(filepath)
raise TemplateDoesNotExist, str(tried)
if template_dirs:
error_msg = "Tried %s" % tried
else:
error_msg = "Your TEMPLATE_DIRS settings is empty. Change it to point to at least one template directory."
raise TemplateDoesNotExist, error_msg
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment