[Zope] Acquisition not working for me

Jim Anderson ezjab at ieee.org
Wed Sep 22 15:22:26 EDT 2004


Hi,

I have a problem working with acquisition. I'm working with
python classes in Zope 2.7.1. These class are zope objects.

My class structure has class F derived from Folder
and class I derived from SimpleItem.

An instance of I is created in class F and then
a call to setObject is made with the id and handle
to the instance of I.

When I bring up zope, the instance of I shows up
in the folder, as expected.

However, if I execute self.absolute_url_path()
in I, it does not return a full path, only the id
of the instance object. When I step through
the absolute_url_path source code, I find that
the instance of I does not have an attribute
for self.aq_parent. I was surprised at this because
I is a SimpleItem which in turn is derived
from Acquisition.

Am I mistaken in my expectation that instance
I would have an aq_parent that is the folder that
contains it?

Thank you in advance.

Jim Anderson




More information about the Zope mailing list