[Zope] Re: __bobo_traverse__ help
Josef Meile
jmeile at hotmail.com
Fri Nov 10 13:50:25 EST 2006
Hi Garito,
>> You may try to return a wrapper that behaves the same way
>> as the original object (by deriving from the respective type)
>> but has "__roles__ = None" as additional attribute (which declares
>> the object public).
>>
>>
>>
>>
> Uau!
> Can you point me to a simple example or similar? I'm not sure if I
> understand what you are telling me
I guess Dieter is telling you something like this:
def __bobo_traverse__(self, REQUEST, name):
obj = self.Propiedad(name)
if obj is None: return self
else:
obj.__roles__ = None
return obj
Although, I would try this as well:
def __bobo_traverse__(self, REQUEST, name):
obj = self.Propiedad(name)
if obj is None: return self
else:
return obj.__of__(self)
I was having a similar problem (not with __bobo_traverse__), but it was
an UnauthorizedException, and I could solve it by using the second
sintax: "__of__(self)
Regards
Josef
More information about the Zope
mailing list