[Zope] How to make my product catalogaware

Garito garito at sistes.net
Fri Jun 11 05:21:36 EDT 2004


Thank you for the info. I'll try it!!!!



----- Original Message ----- 
From: "Ben Last (Zope)" <zope at benlast.com>
To: "Garito" <garito at sistes.net>; "Lista Oficial de Zope" <zope at zope.org>
Sent: Thursday, June 10, 2004 12:46 PM
Subject: RE: [Zope] How to make my product catalogaware


> > From: Garito
> > Hi
> > Have you some tutorial or help about how to make my product
catalogaware?
> 1) inherit from CatalogAware, and define the default catalog and override
> PrincipiaSearchSource:
>
> from Products.ZCatalog.CatalogPathAwareness import CatalogAware
>
> class MyProduct(CatalogAware...
>
>     #...snip...
>
>     #
>     # Stuff to support Cataloging
>     #
>
>     default_catalog = "FloofStorage"
>
>     def PrincipiaSearchSource(self):
>         """Return cataloguable key for ourselves."""
>         return str(self)
>
> 2) Ensure that you call self.reindex_object() whenever there's a change to
> any attributes that may be cataloged.  You should be sure to do this in
any
> methods that override those of CatalogAware itself (in particular,
> manage_addProperty, manage_editProperties, manage_changeProperties,
> manage_delProperties, etc).
>
> Espero que esto es suficiente para comencar...
>
> ben
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>





More information about the Zope mailing list