[Grok-dev] Re: five.grok

Lennart Regebro regebro at gmail.com
Sun Aug 3 04:01:15 EDT 2008


On Fri, Aug 1, 2008 at 12:24, Godefroid Chapelle <gotcha at bubblenet.be> wrote:
> iow, can we keep code like below working ?
>
> import grokcore.component
> import grokcore.view
> import grokcore.security
>
> class Branch(grokcore.component.Context):
>    pass
>
> class Clean(grokcore.view.View):
>    grokcore.component.context(Branch)
>    grokcore.security.require('zope.View')
>
> (or sthing similar, code above not tested)

Most likely, this would work also in Zope2, except you wouldn't get
any security on the views, as it would have no aq context. This we can
not do anything about, so views would have to be imported from
five.grok. Unless somebody has come up with something clever the last
week or so. :)

-- 
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64


More information about the Grok-dev mailing list