Hi, You can access to the parent object with : parent = object.getParentNode() Sylvain Boureliou Etudiant à l'Université de Technologie de Belfort-Montbéliard http://www.liberservice.net/sylvain -----Message d'origine----- De : zope-admin@zope.org [mailto:zope-admin@zope.org]De la part de Michel Vayssade Envoyé : jeudi 25 octobre 2001 14:11 À : zope@zope.org Objet : [Zope] access to parent Hi, in DTML you access to the parent object with PARENTS[0] for example <dtml-var PARENTS[0].id> What is the equivalent inside python code ? I guess the answer will be different if this python code is activated via the web interface OR if activated through the creation of new instance from another python code. -- _/ _/ _/_/_/ _/_/ Michel.Vayssade@UTC.fr Service Informatique _/ _/ _/ _/ T:33/0-3.44.23.49.24 Universite de Technologie _/ _/ _/ _/ F:33/0-3.44.23.46.77 BP 20.529 60205 Compiegne _/_/ _/ _/_/ _ mv@utc.fr __/www.utc.fr/~vayssade____ France _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Thu, 25 Oct 2001, Sylvain Boureliou wrote:
You can access to the parent object with : parent = object.getParentNode()
hum, yes find it in the "search" of the zope's help, but I tried that yesterday, but never find the magic import statement making this function working. in the same idea, I tried things like 'aq_parent' same always error like : unknown function, unknown attribut, .... -- _/ _/ _/_/_/ _/_/ Michel.Vayssade@UTC.fr Service Informatique _/ _/ _/ _/ T:33/0-3.44.23.49.24 Universite de Technologie _/ _/ _/ _/ F:33/0-3.44.23.46.77 BP 20.529 60205 Compiegne _/_/ _/ _/_/ _ mv@utc.fr __/www.utc.fr/~vayssade____ France
participants (2)
-
Michel Vayssade -
Sylvain Boureliou