27 Aug
2000
27 Aug
'00
7:39 p.m.
ZCatalog would be easier to use if it had a recatalog_object method:
def recatalog_object(self, obj, uid): """Adds object to the catalog if not already present. Removes old entry first, if already in present.""" self.uncatalog_object(uid) self.catalog_object(obj, uid) [...] Any comments?
Well, from the fact that in CatalogAwareness.py the method "reindex_object", which essentially does the equivalent of what you want but for CatalogAware objects, is prefaced by the comment "Suprisingly useful", I'd say you are on the right track... --RDM