[Zope] __bobo_traverse__ and a no-object

Garito garito at sistes.net
Fri Jul 14 01:04:55 EDT 2006


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!

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




More information about the Zope mailing list