251 |
251 |
252 .. automethod:: cubicweb.web.application.CubicWebPublisher.main_handle_request |
252 .. automethod:: cubicweb.web.application.CubicWebPublisher.main_handle_request |
253 """ |
253 """ |
254 |
254 |
255 def __init__(self, config, |
255 def __init__(self, config, |
256 session_handler_fact=CookieSessionHandler, |
256 session_handler_fact=CookieSessionHandler): |
257 vreg=None): |
|
258 self.info('starting web instance from %s', config.apphome) |
257 self.info('starting web instance from %s', config.apphome) |
259 if vreg is None: |
|
260 vreg = cwvreg.CWRegistryStore(config) |
|
261 self.vreg = vreg |
|
262 # connect to the repository and get instance's schema |
258 # connect to the repository and get instance's schema |
263 self.repo = config.repository(vreg) |
259 self.repo = config.repository() |
|
260 vreg = self.vreg = self.repo.vreg |
264 if not vreg.initialized: |
261 if not vreg.initialized: |
265 config.init_cubes(self.repo.get_cubes()) |
262 config.init_cubes(self.repo.get_cubes()) |
266 vreg.init_properties(self.repo.properties()) |
263 vreg.init_properties(self.repo.properties()) |
267 vreg.set_schema(self.repo.get_schema()) |
264 vreg.set_schema(self.repo.get_schema()) |
268 # set the correct publish method |
265 # set the correct publish method |