Mercurial > kallithea
diff rhodecode/config/environment.py @ 2016:6020e3884a58 beta
implements #212 moved default encoding variable into rhodecode-config. It's now possible to change
default utf8 to some other encoding.
- also added instance-id to config
- update ini files
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 22 Feb 2012 04:30:26 +0200 |
parents | fe8c2e881403 |
children | 82a88013a3fd 926f55b038bc |
line wrap: on
line diff
--- a/rhodecode/config/environment.py Wed Feb 22 04:11:29 2012 +0200 +++ b/rhodecode/config/environment.py Wed Feb 22 04:30:26 2012 +0200 @@ -41,12 +41,11 @@ # 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 @@ 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 @@ 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 @@ # 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