Exemple #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()
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()
Exemple #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)
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)