comparison rhodecode/config/environment.py @ 1205:f4807acf643d beta

added __license__ into main of rhodecode, PEP8ify
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 04 Apr 2011 19:43:31 +0200
parents 405b80e4ccd5
children 882ac77dc709
comparison
equal deleted inserted replaced
1204:faf31099a70a 1205:f4807acf643d
18 from rhodecode.model import init_model 18 from rhodecode.model import init_model
19 from rhodecode.model.scm import ScmModel 19 from rhodecode.model.scm import ScmModel
20 from rhodecode.lib.timerproxy import TimerProxy 20 from rhodecode.lib.timerproxy import TimerProxy
21 21
22 log = logging.getLogger(__name__) 22 log = logging.getLogger(__name__)
23
23 24
24 def load_environment(global_conf, app_conf, initial=False): 25 def load_environment(global_conf, app_conf, initial=False):
25 """Configure the Pylons environment via the ``pylons.config`` 26 """Configure the Pylons environment via the ``pylons.config``
26 object 27 object
27 """ 28 """
65 #MULTIPLE DB configs 66 #MULTIPLE DB configs
66 # Setup the SQLAlchemy database engine 67 # Setup the SQLAlchemy database engine
67 if config['debug'] and not test: 68 if config['debug'] and not test:
68 #use query time debugging. 69 #use query time debugging.
69 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.', 70 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.',
70 proxy=TimerProxy()) 71 proxy=TimerProxy())
71 else: 72 else:
72 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.') 73 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.')
73 74
74 init_model(sa_engine_db1) 75 init_model(sa_engine_db1)
75 76