/shabti/templates/shenu/+package+/lib/app_globals.py_tmpl
Unknown | 19 lines | 16 code | 3 blank | 0 comment | 0 complexity | 8714c5b235af300b10f8fb13d1f7d4d8 MD5 | raw file
1"""The application's Globals object"""
2from pylons import config
3from beaker.cache import CacheManager
4from beaker.util import parse_cache_config_options
5
6class Globals(object):
7 """Globals acts as a container for objects available throughout the
8 life of the application
9
10 """
11 def __init__(self, config):
12 """One instance of Globals is created during application
13 initialization and is available during requests via the
14 'app_globals' variable
15
16 """
17 self.cache = CacheManager(**parse_cache_config_options(config))
18 import pylons
19 self.version = pylons.__version__