Mercurial > kallithea
diff rhodecode/config/environment.py @ 1036:405b80e4ccd5 beta
Major refactoring, removed when possible calls to app globals.
Refactored models to fetch the paths needed for scans from database directly
small fixes in base
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 12 Feb 2011 21:21:23 +0100 |
parents | da5075ce681c |
children | f4807acf643d |
line wrap: on
line diff
--- a/rhodecode/config/environment.py Sat Feb 12 18:16:15 2011 +0100 +++ b/rhodecode/config/environment.py Sat Feb 12 21:21:23 2011 +0100 @@ -13,7 +13,7 @@ from rhodecode.config.routing import make_map from rhodecode.lib import celerypylons -from rhodecode.lib.auth import set_available_permissions, set_base_path +from rhodecode.lib.auth import set_available_permissions from rhodecode.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config from rhodecode.model import init_model from rhodecode.model.scm import ScmModel @@ -72,13 +72,11 @@ sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.') init_model(sa_engine_db1) - #init baseui - config['pylons.app_globals'].baseui = make_ui('db') - g = config['pylons.app_globals'] - repo2db_mapper(ScmModel().repo_scan(g.paths[0][1], g.baseui)) + repos_path = make_ui('db').configitems('paths')[0][1] + repo2db_mapper(ScmModel().repo_scan(repos_path)) set_available_permissions(config) - set_base_path(config) + config['base_path'] = repos_path set_rhodecode_config(config) # CONFIGURATION OPTIONS HERE (note: all config options will override # any Pylons config options)