Add ZClass Item to Folder from Python?
All, Is there any way to add a ZClass to a folder using python only? I have been able to do this with dtml by calling the xxx_add dtml method in the ZClass like such: <dtml-with "manage_addProduct['Feedback']"> <dtml-call "Feedback_add(_.None,_,NoRedir=1)"> </dtml-with> I have added the NoRedir (as mentioned in a zope article) to prevent the redirect. But, I would like to be able to do this from within python. Is there anyway to do this? Thanks, Chris __________________________________________________ Do You Yahoo!? Find the one for you at Yahoo! Personals http://personals.yahoo.com
Chris Bruce writes:
Is there any way to add a ZClass to a folder using python only? I have been able to do this with dtml by calling the xxx_add dtml method in the ZClass like such:
<dtml-with "manage_addProduct['Feedback']"> <dtml-call "Feedback_add(_.None,_,NoRedir=1)"> </dtml-with> Already answered in the mailing list (--> archives):
product= context.manage_addProduct['Feedback'] product.Feedback_add(None,product,NoRedir=1) Dieter
participants (2)
-
Chris Bruce -
Dieter Maurer