[Zope] creating objects in dtml?

Ted holden medved at fcc.net
Mon Oct 20 11:50:20 EDT 2003


I have a python class which I've set up as a zope product and which shows up 
as such.

Now, products installed this way don't show up on menus, so I've more or less 
followed the instructions and created a product with a zclass which 
subclasses the installed python product and, sure enough, this zclass shows 
up on menus.

The next step was to create a folder with a dtml  page and an instance of the 
zclass in it, and use the instance of the zclass in the dtml page, and that 
works.

Nonetheless, ultimately, that doesn't seem to be what I want.  Unless I'm 
missing something, that creates a single instance (object) of the class for 
good and all.  I see print statements from the constructor the first time I 
ever bring the page up;  afterwards, the object is still there, but it isn't 
being created.  The systems seems to be saving it.

What I really need is for a user to open a dtml page and create (his/her) 
object in doing so, and then use it.  I assume it's possible to do that in 
dtml but I don't see any descriptions of how to do it.  I'd appreciate 
hearing from anyone who knows how this is done.







More information about the Zope mailing list