[Zope] How to limit types of classes added to a Folder
Russell Fine
MisterFine at fineline-services.com
Mon Mar 22 20:55:43 EST 2004
I'm building a class (Site) that contains a Folder (Called screenshots) in which I will be storing instances of a class I've built called ScreenShot. The problem is that I can't figure out how to make the Folder interface in the ZMI limit the instance types to ScreenShot. In the Site class __init__ method, I have :
OFS.Folder.manage_addFolder(self, 'screenshots', 'Screen Shots')
self.screenshots.meta_types=('ScreenShot')
However, this isn't working. I looked into the Folder class, and discovered that it's base class ObjectManager has a class property (not instance) called meta-types that is a tuple. do I need to sub-class Folder and set meta_types at the class level ?
Russell Fine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20040322/2a45f8db/attachment.html
More information about the Zope
mailing list