# HG changeset patch # User Adrien Di Mascio # Date 1253697398 -7200 # Node ID c684606a95e0c91dde1821f3837832895fa8a64d # Parent c92170fca813363a904c2cc92127863a039d6019 [bootstrap] metadata hooks need to be registered at bootstrap time for db creation diff -r c92170fca813 -r c684606a95e0 server/repository.py --- a/server/repository.py Wed Sep 23 11:13:39 2009 +0200 +++ b/server/repository.py Wed Sep 23 11:16:38 2009 +0200 @@ -188,12 +188,13 @@ # need to load the Any and CWUser entity types etdirectory = join(CW_SOFTWARE_ROOT, 'entities') self.vreg.init_registration([etdirectory]) - self.vreg.load_file(join(etdirectory, '__init__.py'), - 'cubicweb.entities.__init__') - self.vreg.load_file(join(etdirectory, 'authobjs.py'), - 'cubicweb.entities.authobjs') - self.vreg.load_file(join(etdirectory, 'wfobjs.py'), - 'cubicweb.entities.wfobjs') + for modname in ('__init__', 'authobjs', 'wfobjs'): + self.vreg.load_file(join(etdirectory, '%s.py' % modname), + 'cubicweb.entities.%s' % modname) + hooksdirectory = join(CW_SOFTWARE_ROOT, 'hooks') + self.vreg.init_registration([hooksdirectory]) + self.vreg.load_file(join(hooksdirectory, 'metadata.py'), + 'cubicweb.hooks.metadata') else: # test start: use the file system schema (quicker) self.warning("set fs instance'schema")