[z3-five] Adapter and View insanity
Martin Aspeli
optilude at gmx.net
Thu Nov 16 13:37:37 CET 2006
Rocky Burt <rocky <at> serverzen.com> writes:
>
> 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.
Indeed.
Also, Five's version of BrowserView mixes in acquisition, which is needed to
avoid security problems in zope 2.
Martin
More information about the z3-five
mailing list