[Zope] Re: _allowed_meta_types
Maik Jablonski
maik.jablonski at uni-bielefeld.de
Wed Oct 8 12:49:56 EDT 2003
Richard Jennings wrote:
> Hi,
>
> This is a subject which has already appeared in the mailing list, but I could not see
> an outcome, eg:
>
> Jeff Kowalczyk jtk at adelphia.net
> Wed, 1 May 2002 01:09:20 -0400 et al.
>
> I have some meta_types which depend on some services which can be started/stopped.
> It would be elegant to stop the addition of instances when the services are not
> running by adding and removing the classes from the add list, as appropriate.
>
> Has anybody solved the problem of modifying the add-list programmatically?
You must declare a method called all_meta_types(self) in your
ObjectManager / Folder, which returns a list with the metatypes you want
to allow to add. You can find a working example in:
http://www.zope.org/Members/mjablonski/PropertyFolder
Cheers, Maik
More information about the Zope
mailing list