Don't try to load app directory templates from apps with a path (eg eggs)

This commit is contained in:
Florian Apolloner 2013-12-27 11:42:24 +01:00
parent 6aa1a31660
commit f00243f36d
1 changed files with 2 additions and 0 deletions

View File

@ -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: