[z3-five] Adaptation in untrusted code

Chris Withers chris at simplistix.co.uk
Thu Nov 16 12:57:02 CET 2006


Martin Aspeli wrote:
>>> If your class derives from Products.Five.browser.BrowserView (I assume
>>> you're on Zope 2 underneath, if not it's
>>> zope.publisher.browser.BrowserView I think), you can override
>>> __call__() to do whatever (using self.context and self.request as
>>> appropriate).
>> Dammit, why can't I just use a simple adapter 
> 
> You can. You just can't traverse to an adapter using foo/@@adapter_name as you 
> seem to want to do. You can either do it in a view class and return the 
> rendered result for use in TAL, or you can have a view on foo that does 
> whatever. 

Can you explain the difference between "do it in a view class and return 
the rendered result" and "have a view on foo that does whatever"?

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the z3-five mailing list