Skip to content

Commit

Permalink
legacy templates show when new templates are missing
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed May 10, 2012
1 parent deb9e9b commit d6f33c6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ckan/config/environment.py
Expand Up @@ -156,7 +156,13 @@ def find_controller(self, controller):
config['pylons.h'] = helpers

## redo template setup to use genshi.search_path (so remove std template setup)
template_paths = [paths['templates'][0]]
legacy_templates_path = os.path.join(root, 'templates_legacy')
if asbool(config.get('ckan.legacy_templates', 'no')):
template_paths = [legacy_templates_path]
else:
template_paths = [paths['templates'][0]]
template_paths.append(legacy_templates_path)

extra_template_paths = config.get('extra_template_paths', '')
if extra_template_paths:
# must be first for them to override defaults
Expand Down

0 comments on commit d6f33c6

Please sign in to comment.