equal
deleted
inserted
replaced
101 from cubicweb.server.repository import Repository |
101 from cubicweb.server.repository import Repository |
102 from cubicweb.server.utils import TasksManager |
102 from cubicweb.server.utils import TasksManager |
103 return Repository(config, TasksManager(), vreg=vreg) |
103 return Repository(config, TasksManager(), vreg=vreg) |
104 elif method == 'zmq': |
104 elif method == 'zmq': |
105 from cubicweb.zmqclient import ZMQRepositoryClient |
105 from cubicweb.zmqclient import ZMQRepositoryClient |
106 return ZMQRepositoryClient(config, vreg=vreg) |
106 return ZMQRepositoryClient(database) |
107 else: # method == 'pyro' |
107 else: # method == 'pyro' |
108 # resolve the Pyro object |
108 # resolve the Pyro object |
109 from logilab.common.pyro_ext import ns_get_proxy, get_proxy |
109 from logilab.common.pyro_ext import ns_get_proxy, get_proxy |
110 pyroid = database or config['pyro-instance-id'] or config.appid |
110 pyroid = database or config['pyro-instance-id'] or config.appid |
111 try: |
111 try: |
590 esubpath = subpath |
590 esubpath = subpath |
591 if 'views' in subpath: |
591 if 'views' in subpath: |
592 esubpath = list(subpath) |
592 esubpath = list(subpath) |
593 esubpath.remove('views') |
593 esubpath.remove('views') |
594 esubpath.append(join('web', 'views')) |
594 esubpath.append(join('web', 'views')) |
|
595 # first load available configs, necessary for proper persistent |
|
596 # properties initialization |
|
597 config.load_available_configs() |
|
598 # then init cubes |
595 config.init_cubes(cubes) |
599 config.init_cubes(cubes) |
|
600 # then load appobjects into the registry |
596 vpath = config.build_appobjects_path(reversed(config.cubes_path()), |
601 vpath = config.build_appobjects_path(reversed(config.cubes_path()), |
597 evobjpath=esubpath, |
602 evobjpath=esubpath, |
598 tvobjpath=subpath) |
603 tvobjpath=subpath) |
599 self.vreg.register_objects(vpath) |
604 self.vreg.register_objects(vpath) |
600 |
605 |