Re: [Zope] ZCatalog in python (getting closer)
I am getting closer to having a working catalog. Thanks everyone, all your hints have been really helpful. The catalog is automatically created when I add a new instance of my class to a folder My sub-classes now inherit: (CatalogAware, Persistent, Implicit, SimpleItem) It was the SimpleItem combined with the code used (in squishdot) to add an item that was preventing the catalog from finding it. When I changed it to: ob=PromoterPost(id,title) ob.id = id ob.title = title self._setObject(id,ob) It can now be found by the catalog when I manually update it in the management screen. It also now exists in the zope management screens, which is forcing me into better object management. =P Still, the catalog does not automatically update when a new object is added. can someone explain where the index_object() call should be? In my case it should be in the PromoterPost.__init__ method correct? It does not belong in my base class' call that creates the object right? Thanks again! -ed- ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] ZCatalog in python
On Sun, 11 Jun 2000, Dieter Maurer wrote: The Find machinery (and therefore, ZCatalog) uses the method "objectItems" to locate the children of an object. If such a method does not exist or does not return the sequence of children, the catalog will not find them. That shouldn't matter for CatalogAware classes, though, should it? I made some objects appear in a catalog added by a product (EMarket). All I had to do was add CatalogAware as a base class to the object, and put the index_object and reindex_object in the appropriate methods. Of course, this object does also subclass Folder, so the method Dieter refers to is defined on my objects. --RDM ___ Zope maillist - [EMAIL PROTECTED] 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 )
[Zope] ZCatalog in python
I'm in a similar situation with Aaron, except my product is mostly python. I emulated the cataloging in the PortalCatalog method, but left out the permission check. When my product is added to a folder, the catalog gets created, and has the indexes I set up. I can create a zsearchinterface, and search/find the instance of my product, but none of the data that exists below that. Do my sub-objects need to inherit from any zope classes in order to get indexed? I know the Zclasses do this automatically, what's the majick trick for this in python? I have tried, catalogAwareness, index_object at item creation, and reindex_object at item edit. none of these seem to do it, I imagine because the catalog wants them to be a certain type, and they're not. Any ideas? ___ Zope maillist - [EMAIL PROTECTED] 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 )