/shabti/templates/shenu/+package+/lib/app_globals.py_tmpl
https://bitbucket.org/gawel/shabti · Unknown · 19 lines · 16 code · 3 blank · 0 comment · 0 complexity · 8714c5b235af300b10f8fb13d1f7d4d8 MD5 · raw file
- """The application's Globals object"""
- from pylons import config
- from beaker.cache import CacheManager
- from beaker.util import parse_cache_config_options
- class Globals(object):
- """Globals acts as a container for objects available throughout the
- life of the application
- """
- def __init__(self, config):
- """One instance of Globals is created during application
- initialization and is available during requests via the
- 'app_globals' variable
- """
- self.cache = CacheManager(**parse_cache_config_options(config))
- import pylons
- self.version = pylons.__version__