[Zope] __bobo_traverse__ and a no-object

Garito garito at sistes.net
Fri Jul 14 11:17:51 EDT 2006


Garito escribió:
> Hi all!
>
> Please, look at this code:
>
> def __bobo_traverse__(self, REQUEST, name):
>        obj = getattr(self, name, None)
>        if obj is not None: return obj
>        else:
>            obj = self.Dame(name)
>            if obj is not None: return obj
>            else:
>                if 'Parametros' in self.REQUEST: 
> self.REQUEST['Parametros'] = self.REQUEST['Parametros'] + [name]
>                else: self.REQUEST['Parametros'] = [name]
>                return self
>
> self.Dame is a function that seeks for an object with the name "name"
>
> I wonder why I can do this on a Page Template:
>
> <tal:b tal:replace='python: here.Texto' />
>
> Where Texto is a adquired property, but not this:
>
> <tal:b tal:replace='here/Texto' />
>
> because zope raises an unauthorized error
>
> How can I solve this point?
>
> Thanks!
>
Anyone can tell me what is happening here?

-- 
Mis Cosas
http://blogs.sistes.net/Garito




More information about the Zope mailing list