I'm relatively new to Python-based development of Zope products. I've got
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 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
ObjectManager-based object. I can't figure that one out. I assumed I could
do it by having an entry for Thing in Container's all_meta_types property,
and by *not* registering it in Unfortunately, that fails. If I
click on the "Add Thing" button in the ZMI when viewing the content of a
Container, I get

  Cannot locate object at
  http://localhost:8080/kb0/manage_addProduct/  [ignore line break]
If I register Thing in, then the Add Thing button works
perfectly, but I can add a Thing to any folder in the ZMI.

It looks like the registration process is necessary to get
manage_addThingForm added to whatever registry of constructors
manage_addProduct['MyProduct'] accesses. Is there a way around this? I'd
think what I'm trying to do is pretty standard, but I can't find anything



Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to