[Zope] Restrict object list in folderish product, it works, but how?

Rene Pijlman rpijlman@wanadoo.nl
Sun, 24 Jun 2001 19:30:09 +0200


Last week I asked on this list how to develop a folderish Python-based
product, and how to use ZPT's in a product. Based on the answers and
examples I received I've created three new mini how-to's:

Develop a folderish Python-based product:
http://www.zope.org/Members/rpijlman/FolderishProduct

Restrict the available objects list of a Python-based folderish product:
http://www.zope.org/Members/rpijlman/FolderishProduct/RestrictAvailableOb=
jec
ts

Use page templates in a Python-based product:
http://www.zope.org/Members/rpijlman/ZPTInProduct

There is still one piece of code that I don't understand. To restrict the
list of addable objects, in the folderish object I override all_meta_type=
s
inherited from ObjectManager. This method returns a tuple of dictionaries.
Every dictionary contains the name of the object and the method the ZMI m=
ust
invoke to create an instance.

return ({'name':'Foo',
         'action':'manage_addProduct/FolderishProductDemo/addFooForm'},

(Full source code on
http://www.zope.org/Members/rpijlman/FolderishProduct/RestrictAvailableOb=
jec
ts)

I've copied the idea from the Mailbag product. It works, but what is this
manage_addProduct/... method? What does it do precisely? Why can't ZMI ca=
ll
addFooForm directly? Can someone shed some light on this?

Regards,
Ren=E9 Pijlman