Mercurial > public > src > rhodecode
annotate pylons_app/lib/app_globals.py @ 113:b6e219f3a58d
removed ununsed imports
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 28 Apr 2010 01:56:11 +0200 |
parents | f7c403e89d5b |
children | ea893ffb7f00 |
rev | line source |
---|---|
0 | 1 """The application's Globals object""" |
113
b6e219f3a58d
removed ununsed imports
Marcin Kuzminski <marcin@python-works.com>
parents:
112
diff
changeset
|
2 |
43 | 3 from beaker.cache import CacheManager |
4 from beaker.util import parse_cache_config_options | |
112
f7c403e89d5b
updated appglobals, to handle only the baseui config. removed hg app from it
Marcin Kuzminski <marcin@python-works.com>
parents:
93
diff
changeset
|
5 from pylons_app.lib.utils import make_ui |
43 | 6 |
0 | 7 class Globals(object): |
8 | |
9 """Globals acts as a container for objects available throughout the | |
10 life of the application | |
11 | |
12 """ | |
13 | |
43 | 14 def __init__(self, config): |
0 | 15 """One instance of Globals is created during application |
16 initialization and is available during requests via the | |
17 'app_globals' variable | |
18 | |
19 """ | |
43 | 20 self.cache = CacheManager(**parse_cache_config_options(config)) |
112
f7c403e89d5b
updated appglobals, to handle only the baseui config. removed hg app from it
Marcin Kuzminski <marcin@python-works.com>
parents:
93
diff
changeset
|
21 self.baseui = make_ui('hgwebdir.config') |
f7c403e89d5b
updated appglobals, to handle only the baseui config. removed hg app from it
Marcin Kuzminski <marcin@python-works.com>
parents:
93
diff
changeset
|
22 self.paths = self.baseui.configitems('paths') |
93
aec4c0071cb3
added empty controllers for branches tags files graph, routing and test for them
Marcin Kuzminski <marcin@python-works.com>
parents:
80
diff
changeset
|
23 self.base_path = self.paths[0][1].replace('*', '') |