[Zope] catalog aware not working.. help

Allen Huang swapp0 at yahoo.com
Tue Mar 20 03:09:12 EDT 2007


I made a pyhon product with catalogaware as one of my base class but my zcatalog named 'catalog' doesn't automatically catalog when I add a product item. what could be a problem?

Please help

this is part of my code that include catalogawareness:

class ShpTypePointClass(Item, Persistent, Implicit, CatalogAware):
#    print "ShpTypePointClass"
    id='ShpTypePoint'
    meta_type='ShpTypePoint'
    manage_options = (
        { 'label':'Properties','action':'manage_editShpTypePoint' },
        ) + Item.manage_options
    
    #_properties=(
    #    { 'id':'title', 'type':'string', 'mode':'w'},
    #    { 'id':'x', 'type':'string', 'mode':'w'},
    #    { 'id':'y', 'type':'string', 'mode':'w'}
    #    )
    
    def __init__(self, id, x, y, dbfInfo):
#        print 'initializing'
        self.id = id
        self.x = x
        self.y = y
        self.dbfInfo = dbfInfo
        self.reindex_object()
    def printPoint(self):
#        print "print Point"
        return "<br> printPoint Method <br> ID:" + self.id + " -- ( " + self.x  + ", " + self.y + " )"
    def edit(self, x, y, REQUEST=None):
        """Edit the Point"""
#        print "edit"
        self.x = x
        self.y = y
        self.reindex_object()
        if REQUEST is not None:
            return self.manage_editShpTypePoint(self, REQUEST)
    ##Web Methods
    index_html = HTMLFile('DTML/index_html', globals())
    manage_editShpTypePoint = HTMLFile('DTML/manage_editShpTypePoint', globals())
InitializeClass(ShpTypePointClass)


 
____________________________________________________________________________________
Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20070320/e84c4a42/attachment.htm


More information about the Zope mailing list