[Zope] Automatic Cataloging

Andreas Jung lists at zopyx.com
Sun Jun 10 02:49:29 EDT 2007



--On 9. Juni 2007 14:09:15 -0400 Tom Von Lahndorff <tom at modscape.com> wrote:

> Hi,
>
> I have a zCatalog installed and I'm trying to automatically catalog an
> object and it's properties using:
>
> <dtml-with "manage_clone(base_business,newid,REQUEST)">
> <dtml-call "manage_changeProperties(
> title=REQUEST['business_name'],
> business_name=REQUEST['business_name'],
> business_company=REQUEST['business_company'],
> business_street=REQUEST['business_street'],
> business_town=REQUEST['business_town'],
> business_county=REQUEST['business_county'],
> business_state=REQUEST['business_state'],
> business_zipcode=REQUEST['business_zipcode'],
> business_phone=REQUEST['business_phone'],
> business_website=REQUEST['business_website'],
> business_email=REQUEST['business_email'],
> )">
> </dtml-with>
> <dtml-call "zCatalog.catalog_object(business_name,newid)">


What a dirty code :-)

Such code should be written using a PythonScript:

newob = container.manage_clone(...)
newob.manage_changeProperties(REQUEST=context.REQUEST)
catalog.catalog_object(...)


>
> The zCatalog has indexes and metadata:
> business_name
> business_company
> business_street
> business_town
> business_county
> business_state
> business_zipcode
> business_phone
> business_website
> business_email
>
> The object does get cataloged with the "newid" but none of the indexes or
> metadata get updated.

Hard to believe...do you have properties defined for the particular object?

-aj

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20070610/3bd60eda/attachment.bin


More information about the Zope mailing list