Ian Beatty wrote at 2004-2-24 17:33 -0500:
>two classes in my product; let's call them Container and Thing. I want to
>have Container addable to any old folder in the ZMI; that's no problem, I
>just register it in my product's __init__.py file. I want Container to allow
>instances of Thing to be added to it, and nothing else; that's also no
>problem, using all_meta_types.
>However, I want Thing to be addable to Container, but not to any other
You simply do not register "Thing".
You define "constructors" (they are factories indeed, but
Zope uses the term "constructors") for "Thing" on "Container",
among them the "construtor" for the action you used
Your "all_meta_types" will return something like:
'name' : 'Thing',
Note, there is not "manage_addProduct" in the action...
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -