summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Apolloner <florian@apolloner.eu>2013-12-27 11:42:24 +0100
committerFlorian Apolloner <florian@apolloner.eu>2013-12-27 11:42:24 +0100
commitf00243f36df8dfe504491e03be5d5aea076340b3 (patch)
tree831d04e2ec02a7bfa89d8ad441fcedcabfb8c982
parent6aa1a316604c063db88a8aa4cd2f25065ae1394c (diff)
Don't try to load app directory templates from apps with a path (eg eggs)
-rw-r--r--django/template/loaders/app_directories.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/template/loaders/app_directories.py b/django/template/loaders/app_directories.py
index 587bfb0547..b66adaed08 100644
--- a/django/template/loaders/app_directories.py
+++ b/django/template/loaders/app_directories.py
@@ -19,6 +19,8 @@ def calculate_app_template_dirs():
fs_encoding = sys.getfilesystemencoding() or sys.getdefaultencoding()
app_template_dirs = []
for app_config in apps.get_app_configs():
+ if not app_config.path:
+ continue
template_dir = os.path.join(app_config.path, 'templates')
if os.path.isdir(template_dir):
if six.PY2: