28 Nov
2002
28 Nov
'02
7:46 p.m.
Andy McKay wrote:
root = container.restrictedTraverse('/')
The second one is possibly the simpler way to do it.
And it doesn't work, because restrictedTraverse traverses the path down from the ObjectManager it's called on, i.e. its argument is the path relative to container in your example.
Oh yes it does, works fine for me in Zope 2.6.
In OFS/Traversable.py line 95 the it calls getPhysicalRoot() if the path starts with a '/'.
Oh, sorry then, this must have got changed in some zope version. Ok, I learned something. cheers, oliver