[z3-five] Adapter and View insanity

Rocky Burt rocky at serverzen.com
Thu Nov 16 13:20:46 CET 2006


On Thu, 2006-16-11 at 11:56 +0000, Martin Aspeli wrote:
> > 3. I'm deeply disturbed as to how instances of my Render view class come
> >     to magically have a context attribute. wtf?
> 
> It's a browser view. The ZCML directive injects a base class. Yes, it's nasty, 
> which is why it's normally saner to explicitly inherit from 
> Products.Five.browser.BrowserView.

Personally I just provide my own __init__ which assigns context and
request.  But Martin is right, when using <browser:page> Five will
actually create it's own view class.  This magic that I know Philip
tried to get away from with a proposal but I don't believe anything came
of the proposal.

- Rocky


-- 
Rocky Burt
ServerZen Software -- http://www.serverzen.com
News About The Server (blog) -- http://www.serverzen.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://codespeak.net/pipermail/z3-five/attachments/20061116/3a923a30/attachment.pgp 


More information about the z3-five mailing list