[Zope] ZClass Catalog Update

Dieter Maurer dieter at handshake.de
Mon Jan 26 13:15:53 EST 2004


KJZZ Webmaster wrote at 2004-1-25 19:58 -0700:
> ...
>In trying to get a bit closer with this, I am using the following script,
>which can be found here:
>
>http://www.zopelabs.com/cookbook/1032051394
>
>catalog = context.Catalog
>if obj is None:
>  obj=context
># print obj
># print obj.title_or_id(), ' prints the title or id of the object'
>catalog.catalog_object(obj)
># return printed
>
>Yet, after the script has run, I do not get an error, but the individual
>entry does not update in the catalog.
>
>Is it true I should be sending, for instance, the following obj "<story
>instance at 11A9D3E0>" to the catalog_object method?  Or should I be doing
> something else.

"obj" must be the object you want to get recatalogued, whatever
this might be...
It must be the object itself, not a string representation for it.

Note, that you must first modify your object and only then
recatalog it. When you recatalog before the modification,
nothing will happen (with the catalog).

-- 
Dieter



More information about the Zope mailing list