web/application.py
changeset 5442 3ed8afbbdf70
parent 5426 0d4853a6e5ee
child 5508 6718ba5db0eb
equal deleted inserted replaced
5438:2a9181b82806 5442:3ed8afbbdf70
   278 class CubicWebPublisher(object):
   278 class CubicWebPublisher(object):
   279     """the publisher is a singleton hold by the web frontend, and is responsible
   279     """the publisher is a singleton hold by the web frontend, and is responsible
   280     to publish HTTP request.
   280     to publish HTTP request.
   281     """
   281     """
   282 
   282 
   283     def __init__(self, config, debug=None,
   283     def __init__(self, config,
   284                  session_handler_fact=CookieSessionHandler,
   284                  session_handler_fact=CookieSessionHandler,
   285                  vreg=None):
   285                  vreg=None):
   286         self.info('starting web instance from %s', config.apphome)
   286         self.info('starting web instance from %s', config.apphome)
   287         if vreg is None:
   287         if vreg is None:
   288             vreg = cwvreg.CubicWebVRegistry(config, debug=debug)
   288             vreg = cwvreg.CubicWebVRegistry(config)
   289         self.vreg = vreg
   289         self.vreg = vreg
   290         # connect to the repository and get instance's schema
   290         # connect to the repository and get instance's schema
   291         self.repo = config.repository(vreg)
   291         self.repo = config.repository(vreg)
   292         if not vreg.initialized:
   292         if not vreg.initialized:
   293             self.config.init_cubes(self.repo.get_cubes())
   293             self.config.init_cubes(self.repo.get_cubes())