Catalog-aware python product
What do I need to add to my product to make it update it's entry in a Catalog when it is entered, edited, or deleted? thanks
Chad, when you add a z-class to your product, select 'ZCatalog: CatalogAware' to the base class list. Then any objects of this class this will try to update themselves in a catalog with an id 'Catalog' found in your inheritance heirachy. This is described in the Zope Book, chapter 12 http://www.zope.org/Documentation/ZopeBook/SearchingZCatalog.stx I'm currently trying to be able to name the catalog you want each zclass to be associated with, rather than having to just use the default for everything, so check out that thread too. Ben Avery Chad Nantais wrote:
What do I need to add to my product to make it update it's entry in a Catalog when it is entered, edited, or deleted?
thanks
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Aloha, I'm still curious about the original question - I'm getting into python products and need to know how to make a relatively simple product (starting from MaxM's EasyProduct, for example) 'catalog aware'. I know I will be explicitly using the cataloging methods in my python code to catalog and uncatalog...but how do I make them available in the product? Is it just an import of something, or is there more to it? thx, John S. __________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com
There seems to be lots of docs on CatalogAware for ZClasses, but not much about Python Products. Basically, what I want is for a new instance of a product to trigger the re-indexing of the catalog or whatever is neccessary in order for the new instance to appear in a catalog search immediately after creation. It would also be nice if editing the instance triggered a re-indexing to reflect changes in keywords, text, etc. immediateley as well. And, of course, when the instance is deleted it should remove itself from the catalog. Is all or any of this possible through within Python products? Is this what CatalogAware means? My efforts in reverse engineering Python products have yielded little fruit on this subject. Thanks for any help in advance. -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of John Schinnerer Sent: Thursday, July 04, 2002 3:38 PM To: zope list Subject: Re: [Zope] Catalog-aware python product Aloha, I'm still curious about the original question - I'm getting into python products and need to know how to make a relatively simple product (starting from MaxM's EasyProduct, for example) 'catalog aware'. I know I will be explicitly using the cataloging methods in my python code to catalog and uncatalog...but how do I make them available in the product? Is it just an import of something, or is there more to it? thx, John S. __________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Thu, Jul 04, 2002 at 12:38:24PM -0700, John Schinnerer wrote:
I'm still curious about the original question - I'm getting into python products and need to know how to make a relatively simple product (starting from MaxM's EasyProduct, for example) 'catalog aware'.
Newer EasyProduct versions are already CatalogPathAware, so you can see how it was done there. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
participants (4)
-
Ben Avery -
Chad Nantais -
John Schinnerer -
Mike Renfro