Skip to content

Commit

Permalink
[#2375] fix app globals initialisation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Aug 10, 2012
1 parent 3d78e31 commit b53c8c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ckan/config/environment.py
Expand Up @@ -175,6 +175,8 @@ def find_controller(self, controller):

config['routes.map'] = routing.make_map()
config['pylons.app_globals'] = app_globals.app_globals
# initialise the globals
config['pylons.app_globals']._init()

# add helper functions
restrict_helpers = asbool(
Expand Down
2 changes: 2 additions & 0 deletions ckan/lib/app_globals.py
Expand Up @@ -116,7 +116,9 @@ def __init__(self):
initialization and is available during requests via the
'app_globals' variable
'''
self._init()

def _init(self):
self.favicon = config.get('ckan.favicon', '/images/icons/ckan.ico')
facets = config.get('search.facets', 'groups tags res_format license')
self.facets = facets.split()
Expand Down

0 comments on commit b53c8c8

Please sign in to comment.