dbapi.py
changeset 5764 ec5dbbb6a549
parent 5713 605f571198eb
parent 5763 1bdddb7460a9
child 5815 282194aa43f3
equal deleted inserted replaced
5762:730d458ec1bf 5764:ec5dbbb6a549
   530         """
   530         """
   531         if self._closed is not None:
   531         if self._closed is not None:
   532             raise ProgrammingError('Closed connection')
   532             raise ProgrammingError('Closed connection')
   533         return self._repo.get_schema()
   533         return self._repo.get_schema()
   534 
   534 
   535     def load_appobjects(self, cubes=_MARKER, subpath=None, expand=True,
   535     def load_appobjects(self, cubes=_MARKER, subpath=None, expand=True):
   536                         force_reload=None):
       
   537         config = self.vreg.config
   536         config = self.vreg.config
   538         if cubes is _MARKER:
   537         if cubes is _MARKER:
   539             cubes = self._repo.get_cubes()
   538             cubes = self._repo.get_cubes()
   540         elif cubes is None:
   539         elif cubes is None:
   541             cubes = ()
   540             cubes = ()
   553             esubpath.remove('views')
   552             esubpath.remove('views')
   554             esubpath.append(join('web', 'views'))
   553             esubpath.append(join('web', 'views'))
   555         cubes = reversed([config.cube_dir(p) for p in cubes])
   554         cubes = reversed([config.cube_dir(p) for p in cubes])
   556         vpath = config.build_vregistry_path(cubes, evobjpath=esubpath,
   555         vpath = config.build_vregistry_path(cubes, evobjpath=esubpath,
   557                                             tvobjpath=subpath)
   556                                             tvobjpath=subpath)
   558         self.vreg.register_objects(vpath, force_reload)
   557         self.vreg.register_objects(vpath)
   559         if self._cnxtype == 'inmemory':
   558         if self._cnxtype == 'inmemory':
   560             # should reinit hooks manager as well
   559             # should reinit hooks manager as well
   561             hm, config = self._repo.hm, self._repo.config
   560             hm, config = self._repo.hm, self._repo.config
   562             hm.set_schema(hm.schema) # reset structure
   561             hm.set_schema(hm.schema) # reset structure
   563             hm.register_system_hooks(config)
   562             hm.register_system_hooks(config)