summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: