diff --git a/rhodecode/config/environment.py b/rhodecode/config/environment.py --- a/rhodecode/config/environment.py +++ b/rhodecode/config/environment.py @@ -13,7 +13,7 @@ import rhodecode.lib.helpers 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 @@ def load_environment(global_conf, app_co 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)