Hi Serg, Serg wrote:
I can add objects of MyClass through ZMI. How can I add some object through my own interface: for example, on button click on DTML form?
Have that form submit to a python script and do something like: context.manage_addProduct['Your Product Name'].manage_addMyClass(id,None) cheers, Chris
How can I determine 'My Product Name'? My class named 'MyClass'. It be located in dir ../Python/Products/MyProject/.
If I try use below context.manage_addProduct['MyClass'].manage_addMyClass(id,None)
Zope write: "An error was encountered while publishing this resource. Error Type: AttributeError Error Value: MyClass"
If your product is correctly initialized, context.manage_addProduct['MyProject'].manage_addMyClass(id,None) should work. Regards Tino Wildenhain