[Zope] How to obtain the parent-object from an Zope-object

Thierry FLORAC thierry.florac@onf.fr
Fri, 16 May 2003 14:38:08 +0200


On Friday 16 May 2003 10:33, Geir B=E6kholt wrote:
> On  Fri, 16 May 2003 08:55:23 +0200 GMT (..8:55 where i live(GMT+2) )
> Wim Bekker asked the Zope mailinglist about the following:
>
> WB> How can I obtain the 'parent' object in Zope with python (script)?
>
> myparent =3D object.aq_parent


Hi,

Maybe I'm wrong, but I've read here and there that the correct syntax shoul=
d=20
be :

  parent =3D object.aq_inner.aq_parent

if you want to avoid acquisition problems...


 Thierry