[Zope] Getting the correct domain at add time.

Terry Hancock hancock at anansispaceworks.com
Tue Nov 25 19:09:45 EST 2003


On Tuesday 25 November 2003 02:57 pm, Dieter Maurer wrote:
> This means, "absolute_url" is unable to acquire "REQUEST".
> This happens when the "acquisition chain" is not complete.
> [...]
> Note, that newly constructed objects are not yet acquisition wrapped.

Right. Because they wouldn't know where they were supposed
to acquire from, until they've been put into the object tree.

>     container._setObject(id, newObject)
>     newObject = container._getOb(id) # now wrapped

Thanks for clarifying what this code does, I had just
copied it from other manage_add functions, without
really understanding why it was necessary.  Makes
sense to me now.

I figured out my problem -- the call actually wasn't from
the manage_add function for the container, it was in the
__init__() method of the container, which means it was
happening before the acquisition wrapper was added
to it.

Thanks!
Terry

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com



More information about the Zope mailing list