##// END OF EJS Templates
updated appglobals, to handle only the baseui config. removed hg app from it
updated appglobals, to handle only the baseui config. removed hg app from it

File last commit:

r112:f7c403e8 default
r112:f7c403e8 default
Show More
app_globals.py
25 lines | 858 B | text/x-python | PythonLexer
Marcin Kuzminski
initial commit.
r0 """The application's Globals object"""
Marcin Kuzminski
major app speedup moved the wsgi creation to app globals, in order to make it run only once....
r10 #uncomment the following if you want to serve a single repo
#from mercurial.hgweb.hgweb_mod import hgweb
Marcin Kuzminski
Added custom templates, did over check of code to make it work....
r20 import os
changed for pylons 0.1 / 1.0...
r43 from beaker.cache import CacheManager
from beaker.util import parse_cache_config_options
updated appglobals, to handle only the baseui config. removed hg app from it
r112 from pylons_app.lib.utils import make_ui
changed for pylons 0.1 / 1.0...
r43
Marcin Kuzminski
initial commit.
r0 class Globals(object):
"""Globals acts as a container for objects available throughout the
life of the application
"""
changed for pylons 0.1 / 1.0...
r43 def __init__(self, config):
Marcin Kuzminski
initial commit.
r0 """One instance of Globals is created during application
initialization and is available during requests via the
'app_globals' variable
"""
changed for pylons 0.1 / 1.0...
r43 self.cache = CacheManager(**parse_cache_config_options(config))
updated appglobals, to handle only the baseui config. removed hg app from it
r112 self.baseui = make_ui('hgwebdir.config')
self.paths = self.baseui.configitems('paths')
added empty controllers for branches tags files graph, routing and test for them
r93 self.base_path = self.paths[0][1].replace('*', '')