[Zope] DTML to create a product instance (ExternalFile)

Dieter Maurer dieter@handshake.de
Mon, 22 Apr 2002 22:06:51 +0200


davis marques writes:
 > I'm new to Zope and am having a lot of problems figuring out how to do 
 > something in DTML which I expect should be relatively simple.
 > 
 > I have a product called ExternalFile installed.
The standard way to create an instance is

    object_manager.manage_addProduct[product_name].constructor(constructor_arguments)

"object_manager" is the container that should get your new object.

"product_name" is the name of your product (in your case 'ExternalFile').

"constructor" is the constructor. It is usually called
"manage_addXXX" where "XXX" is the class. But not all
products follow the convention. Look at the product documentation!

"constructor_arguments" are the arguments the constructor expects.
Again, look at its documentation.


I know that you can read something like this in

  <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>

I expect that you find it in the Zope Book, too:

  <http://www.zope.org/Documentation/ZopeBook>


Dieter