Mercurial > kallithea
comparison pylons_app/config/environment.py @ 365:ec7b76d4bda4
Added initial query skipp when seting up the app.
Added internal server error when deleting user using ajax permission form
removed graph unneded code
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 27 Jul 2010 14:41:43 +0200 |
parents | 1ef52a70f3b7 |
children | 3bcf9529d221 |
comparison
equal
deleted
inserted
replaced
364:37235cd09703 | 365:ec7b76d4bda4 |
---|---|
13 import pylons_app.lib.app_globals as app_globals | 13 import pylons_app.lib.app_globals as app_globals |
14 import pylons_app.lib.helpers | 14 import pylons_app.lib.helpers |
15 | 15 |
16 log = logging.getLogger(__name__) | 16 log = logging.getLogger(__name__) |
17 | 17 |
18 def load_environment(global_conf, app_conf): | 18 def load_environment(global_conf, app_conf, initial=False): |
19 """Configure the Pylons environment via the ``pylons.config`` | 19 """Configure the Pylons environment via the ``pylons.config`` |
20 object | 20 object |
21 """ | 21 """ |
22 config = PylonsConfig() | 22 config = PylonsConfig() |
23 | 23 |
61 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.') | 61 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.') |
62 | 62 |
63 init_model(sa_engine_db1) | 63 init_model(sa_engine_db1) |
64 config['pylons.app_globals'].baseui = make_ui('db') | 64 config['pylons.app_globals'].baseui = make_ui('db') |
65 | 65 |
66 repo2db_mapper(_get_repos_cached_initial(config['pylons.app_globals'])) | 66 repo2db_mapper(_get_repos_cached_initial(config['pylons.app_globals'], initial)) |
67 set_available_permissions(config) | 67 set_available_permissions(config) |
68 set_base_path(config) | 68 set_base_path(config) |
69 set_hg_app_config(config) | 69 set_hg_app_config(config) |
70 # CONFIGURATION OPTIONS HERE (note: all config options will override | 70 # CONFIGURATION OPTIONS HERE (note: all config options will override |
71 # any Pylons config options) | 71 # any Pylons config options) |