Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/okfn/ckan
Browse files Browse the repository at this point in the history
  • Loading branch information
rossjones committed Jul 12, 2012
2 parents 26c7265 + f2725f3 commit 60a3194
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ckan/config/environment.py
Expand Up @@ -32,7 +32,7 @@ class _Helpers(object):
not been enabled. '''
def __init__(self, helpers, restrict=True):
functions = {}
allowed = helpers.__allowed_functions__
allowed = helpers.__allowed_functions__[:]
# list of functions due to be deprecated
self.deprecated = []

Expand All @@ -42,8 +42,14 @@ def __init__(self, helpers, restrict=True):
if restrict:
continue
functions[helper] = getattr(helpers, helper)
if helper in allowed:
allowed.remove(helper)
self.functions = functions

if allowed:
raise Exception('Template helper function(s) `%s` not defined'
% ', '.join(allowed))

# extend helper functions with ones supplied by plugins
extra_helpers = []
for plugin in p.PluginImplementations(p.ITemplateHelpers):
Expand Down

0 comments on commit 60a3194

Please sign in to comment.