diff --git a/rhodecode/config/environment.py b/rhodecode/config/environment.py --- a/rhodecode/config/environment.py +++ b/rhodecode/config/environment.py @@ -41,12 +41,11 @@ def load_environment(global_conf, app_co # store some globals into rhodecode rhodecode.CELERY_ON = str2bool(config['app_conf'].get('use_celery')) - rhodecode.CONFIG = config config['routes.map'] = make_map(config) config['pylons.app_globals'] = app_globals.Globals(config) config['pylons.h'] = rhodecode.lib.helpers - + rhodecode.CONFIG = config # Setup cache object as early as possible import pylons pylons.cache._push_object(config['pylons.app_globals'].cache) @@ -59,7 +58,7 @@ def load_environment(global_conf, app_co input_encoding='utf-8', default_filters=['escape'], imports=['from webhelpers.html import escape']) - #sets the c attribute access when don't existing attribute are accessed + # sets the c attribute access when don't existing attribute are accessed config['pylons.strict_tmpl_context'] = True test = os.path.split(config['__file__'])[-1] == 'test.ini' if test: @@ -68,7 +67,7 @@ def load_environment(global_conf, app_co create_test_env(TESTS_TMP_PATH, config) create_test_index(TESTS_TMP_PATH, config, True) - #MULTIPLE DB configs + # MULTIPLE DB configs # Setup the SQLAlchemy database engine sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.') @@ -82,4 +81,7 @@ def load_environment(global_conf, app_co # CONFIGURATION OPTIONS HERE (note: all config options will override # any Pylons config options) + # store config reference into our module to skip import magic of + # pylons + rhodecode.CONFIG.update(config) return config