[Zope] RE: [ Zope] ZCatalog & dynamic sites
Corey Zimmet
caz@tcdi.com
Fri, 21 Jul 2000 11:07:17 -0400
Write a brains class that you would call to catalog and uncatalog
insert/update/delete ZSQLmethods:
For example:
class MyObject:
"""
Some arbitrary object - MyObjectID - the id of your object
MyCatalog - the catalog you want to use to
index the sql
MyText1 - metadata column in your catalog
MyText2 - an additional metadata column in
your catalog
"""
def FullText(self):
"an index in your catalog"
return "%s %s" % (self.MyText1, self.MyText2)
def catalogObject(self):
"Catalog me"
self.MyCatalog.catalog_object(self, self.MyObjectID)
def uncatalogObject(self):
"Uncatalog me"
self.MyCatalog.uncatalog_object(self.MyObjectID)
Hope this helps,
Corey