Skip to content

Commit

Permalink
Fixed CMS_TEMPLATES_DIR without __init__.py (#5649)
Browse files Browse the repository at this point in the history
  • Loading branch information
czpython committed Sep 24, 2016
1 parent 47912ae commit 095ad95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cms/utils/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def get_templates():
config_path = os.path.join(tpldir, '__init__.py')
# Try to load templates list and names from the template module
# If module file is not present skip configuration and just dump the filenames as templates
if config_path:
if os.path.isfile(config_path):
template_module = load_from_file(config_path)
templates = [(os.path.join(prefix, data[0].strip()), data[1]) for data in template_module.TEMPLATES.items()]
else:
Expand Down

0 comments on commit 095ad95

Please sign in to comment.