Skip to content

Commit

Permalink
[#421] Fix for checking if we're in legacy templates mode for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmartin committed Mar 14, 2013
1 parent 0d84c28 commit 37a9320
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ckan/controllers/tag.py
@@ -1,5 +1,5 @@
from pylons.i18n import _
from pylons import request, c
from pylons import request, c, config

import ckan.logic as logic
import ckan.model as model
Expand Down Expand Up @@ -65,4 +65,7 @@ def read(self, id):
except logic.NotFound:
base.abort(404, _('Tag not found'))

h.redirect_to(controller='package', action='search', tags=c.tag.get('name'))
if h.asbool(config.get('ckan.legacy_templates', False)):
return base.render('tag/read.html')
else:
h.redirect_to(controller='package', action='search', tags=c.tag.get('name'))

0 comments on commit 37a9320

Please sign in to comment.