Adding instances of objects using manage_addProduct()
Hi, I am quite new to ZOPE. I am trying to dynamically add new objects into Zope from an External Method. (zope 2.6.3) Adding folders using for example: self.manage_addProduct['OFSP'].manage_addFolder('vhe2','kltest2') That works fine. But now I want to add dynamically a Product called 'ExtFile/ExtImage' (perhaps you know it). I downloaded and installed it. It works find within ZMI. I tried the following in the external method: self.manage_addProduct['ExtFile'].manage_addExtImage('xxx', 'XXXX', 'test xxx', '/home/volkerh/zope/IMGP0377.JPG', '', 'image/jpeg',0,'','', 0,0,None) That does not work. Obviously it does not find the product and the manage_addExtImage-method. Bevor I try to go on with it. Is the second example ok at all or what mistake. Does it has to be self.manage_addProduct['ExtFile'] or something else. Does anybody can show me a working template ? Thanks for any hint. Volker
post@volker-hemmelrath.de wrote at 2004-2-29 22:15 +0100:
... But now I want to add dynamically a Product called 'ExtFile/ExtImage' (perhaps you know it). I downloaded and installed it. It works find within ZMI. I tried the following in the external method: self.manage_addProduct['ExtFile'].manage_addExtImage('xxx', 'XXXX', 'test xxx', '/home/volkerh/zope/IMGP0377.JPG', '', 'image/jpeg',0,'','', 0,0,None)
That does not work. Obviously it does not find the product and the manage_addExtImage-method.
When you get errors, you must look at "Error Type", "Error Value" and the traceback: http://<yourZope>/error_log/manage_workspace In the beginning, you might have problems understanding this information. Then, you must post it (again: "Error type", "Error value" *and* traceback) together with a description as you did it in your message. -- Dieter
post@volker-hemmelrath.de wrote:
But now I want to add dynamically a Product called 'ExtFile/ExtImage' (perhaps you know it). I downloaded and installed it. It works find within ZMI. I tried the following in the external method: self.manage_addProduct['ExtFile'].manage_addExtImage('xxx', 'XXXX', 'test xxx', '/home/volkerh/zope/IMGP0377.JPG', '', 'image/jpeg',0,'','', 0,0,None)
That does not work. ^^^^^^^^^^^^^^^^^^^
Try expanding on this rather useless statement. Exception? Type? Value? traceback? cheers, Chris
participants (3)
-
Chris Withers -
Dieter Maurer -
post@volker-hemmelrath.de