예제 #1
0
def indexDocSubscriber(event):
    app = ISchoolToolApplication(None, None)
    if app is None:
        return
    obj = removeSecurityProxy(event.object)
    util = getUtility(IIntIds, context=app)
    obj_id = util.getId(obj)
    catalogs = ICatalogs(app)
    for entry in catalogs.values():
        entry.catalog.index_doc(obj_id, obj)
예제 #2
0
def indexDocSubscriber(event):
    app = ISchoolToolApplication(None, None)
    if app is None:
        return
    obj = removeSecurityProxy(event.object)
    util = getUtility(IIntIds, context=app)
    obj_id = util.getId(obj)
    catalogs = ICatalogs(app)
    for entry in catalogs.values():
        entry.catalog.index_doc(obj_id, obj)
예제 #3
0
def reindexDocSubscriber(event):
    app = ISchoolToolApplication(None, None)
    if app is None:
        return
    obj = removeSecurityProxy(event.object)
    util = queryUtility(IIntIds, context=app)
    if util is None:
        return
    obj_id = util.queryId(obj)
    if obj_id is None:
        return
    catalogs = ICatalogs(app)
    if obj is catalogs:
        return
    for entry in catalogs.values():
        entry.catalog.index_doc(obj_id, obj)
예제 #4
0
def reindexDocSubscriber(event):
    app = ISchoolToolApplication(None, None)
    if app is None:
        return
    obj = removeSecurityProxy(event.object)
    util = queryUtility(IIntIds, context=app)
    if util is None:
        return
    obj_id = util.queryId(obj)
    if obj_id is None:
        return
    catalogs = ICatalogs(app)
    if obj is catalogs:
        return
    for entry in catalogs.values():
        entry.catalog.index_doc(obj_id, obj)
예제 #5
0
 def __call__(self):
     catalogs = ICatalogs(self.app)
     for entry in catalogs.values():
         entry.expired = True
예제 #6
0
 def __call__(self):
     catalogs = ICatalogs(self.app)
     for entry in catalogs.values():
         entry.expired = True