[Zope-dev] Getting the parent of a container in a Python Script
Tom Jenkins
tjenkins@devis.com
Thu, 15 Feb 2001 10:11:57 -0500
Do you mean the aq_parent? I believe that is the property that you want.
Cyril Elkaim wrote:
> Hi all,
>
> My question is in the title. I think I'm stupid because I have really searched
> anywhere, and found nothing. The answer is certainly trivial but too many hours
> you know... :-)
>
> I'm able to get all the children of the current container or context but unable
> to get its parent. Maybe it's silly but a 'parent' property for all the
> objects seems to me a good idea. Of such a property may already exist but what is
> its name ?
>
> Of course I have tried REQUEST.PARENTS[0] but this is the parent inside the
> URL, I'm searching the PARENT inside the object system.
>
> Another question how can I get a reference of any object in OBJECT system,
> I've tried unrestrictedTraverse but it seems very 'restrictive' :-)
>
> Aside from my problems Zope rocks really.
>
> Thanks in advance
> Cyril
>
> _______________________________________________
> Zope-Dev maillist - Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope )