How to reference an object under a given folder
Hello, I want to reference an object named "Es" found in the directory /apps/wms . I'd normally create a script in /apps/wms and issue the command obj = getattr(context,"Es") . But how do I do so from a script located elsewhere ? Regards, Danny
--On 7. September 2006 17:33:45 +0800 "Sinang, Danny" <D.Sinang@spi-bpo.com> wrote:
Hello,
I want to reference an object named "Es" found in the directory /apps/wms .
I'd normally create a script in /apps/wms and issue the command obj = getattr(context,"Es") .
Here you're using acquisition.
But how do I do so from a script located elsewhere ?
E.g. through traversal: context.restrictedTraverse('/path/to/object'). -aj -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: info@zopyx.com - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope & Plone development, Consulting
participants (2)
-
Andreas Jung -
Sinang, Danny