Ejemplo n.º 1
0
def ensureEvolved(context):
    root = getRootFolder(context)
    assert ISchoolToolApplication.providedBy(root)
    catalogs = root['schooltool.app.catalog:Catalogs']
    if LinkCatalog.key() in catalogs:
        return
    evolve(context)
    transaction.commit()
Ejemplo n.º 2
0
def ensureEvolved(context):
    root = getRootFolder(context)
    assert ISchoolToolApplication.providedBy(root)
    catalogs = root["schooltool.app.catalog:Catalogs"]
    if LinkCatalog.key() in catalogs:
        return
    evolve(context)
    transaction.commit()
Ejemplo n.º 3
0
def addLinkCatalog(app):
    catalogs = app['schooltool.app.catalog:Catalogs']
    factory = LinkCatalog(app)
    version = factory.getVersion()
    catalog = factory.createCatalog()
    catalogs[factory.key()] = VersionedCatalog(catalog, version)
    factory.setIndexes(catalog)
Ejemplo n.º 4
0
def addLinkCatalog(app):
    catalogs = app["schooltool.app.catalog:Catalogs"]
    factory = LinkCatalog(app)
    version = factory.getVersion()
    catalog = factory.createCatalog()
    catalogs[factory.key()] = VersionedCatalog(catalog, version)
    factory.setIndexes(catalog)