[Zope] can programatically update ZCatalog?

David Shaw spam2@theresistance.net
Sat, 28 Sep 2002 21:33:00 -0400


> Is it possible to update a ZCatalog using python script?
> Are there built in methods to do it, and if so what are they?
> Tom Germaine

They do exist.  Whenever I create a product that needs a catalog, I 
don't use CatalogAware.  Instead, I make the container for the items to 
be cataloged do the work for me in setattr methods.  The methods you 
want are:

             mycatalog.uncatalog_object( self.getPath(object_id) )
             mycatalog.catalog_object( object, self.getPath(object.id) )