goa/dbmyams.py
changeset 2485 ae74b46ea96c
parent 2476 1294a6bdf3bf
child 2730 bb6fcb8c5d71
equal deleted inserted replaced
2484:7e9283731db8 2485:ae74b46ea96c
   165                                  'local', 'share', 'cubicweb', 'schemas')
   165                                  'local', 'share', 'cubicweb', 'schemas')
   166 else:
   166 else:
   167     SCHEMAS_LIB_DIRECTORY = join(CW_SOFTWARE_ROOT, 'schemas')
   167     SCHEMAS_LIB_DIRECTORY = join(CW_SOFTWARE_ROOT, 'schemas')
   168 
   168 
   169 def load_schema(config, schemaclasses=None, extrahook=None):
   169 def load_schema(config, schemaclasses=None, extrahook=None):
   170     """high level method to load all the schema for a lax application"""
   170     """high level method to load all the schema for a lax instance"""
   171     # IMPORTANT NOTE: dbmodel schemas must be imported **BEFORE**
   171     # IMPORTANT NOTE: dbmodel schemas must be imported **BEFORE**
   172     # the loader is instantiated because this is where the dbmodels
   172     # the loader is instantiated because this is where the dbmodels
   173     # are registered in the yams schema
   173     # are registered in the yams schema
   174     for compname in config['included-cubes']:
   174     for compname in config['included-cubes']:
   175         __import__('%s.schema' % compname)
   175         __import__('%s.schema' % compname)