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)
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)
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)
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)
def __call__(self): catalogs = ICatalogs(self.app) for entry in catalogs.values(): entry.expired = True
def __call__(self): catalogs = ICatalogs(self.app) for entry in catalogs.values(): entry.expired = True