Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improved TemplateDoesNotExist error message in django.core.template_file

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 7d553c0650a1dad73c98cf8cd9b8d13eb0633e56 1 parent 3ab5791
Adrian Holovaty adrianholovaty authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 django/core/
6 django/core/
@@ -15,4 +15,8 @@ def load_template_source(template_name, template_dirs=None):
return open(filepath).read()
except IOError:
- 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
Please sign in to comment.
Something went wrong with that request. Please try again.