Files
@ 923f0e6ab010
Branch filter:
Location: kallithea/pylons_app/lib/app_globals.py - annotation
923f0e6ab010
912 B
text/x-python
change error controller,
added handling 404 to mercurial,
added handling 404 to mercurial,
564e40829f80 525ed90e4577 525ed90e4577 525ed90e4577 525ed90e4577 564e40829f80 564e40829f80 564e40829f80 564e40829f80 564e40829f80 564e40829f80 564e40829f80 564e40829f80 564e40829f80 564e40829f80 564e40829f80 564e40829f80 564e40829f80 525ed90e4577 525ed90e4577 525ed90e4577 525ed90e4577 525ed90e4577 525ed90e4577 525ed90e4577 525ed90e4577 525ed90e4577 | """The application's Globals object"""
#uncomment the following if you want to serve a single repo
#from mercurial.hgweb.hgweb_mod import hgweb
from mercurial.hgweb.hgwebdir_mod import hgwebdir
from mercurial.hgweb.request import wsgiapplication
class Globals(object):
"""Globals acts as a container for objects available throughout the
life of the application
"""
def __init__(self):
"""One instance of Globals is created during application
initialization and is available during requests via the
'app_globals' variable
"""
#two ways of building the merc app i don't know
#the fastest one but belive the wsgiapp is better
#self.hgapp = self.make_web_app()
self.hgapp = wsgiapplication(self.make_web_app)
def make_web_app(self):
repos = "hgwebdir.config"
hgwebapp = hgwebdir(repos)
return hgwebapp
|