[Grok-dev] five.grok - what changed to break this?

Martin Aspeli optilude at gmx.net
Sat Sep 27 11:13:32 EDT 2008

sylvain at infrae.com wrote:
>> sylvain at infrae.com wrote:
>    Hello,
>>>> That is, it was registering the 'static' resource directory adapter
>>>> even
>>>> when there was no 'static/' directory to be found!
>>>   It's done the same in Grok. I think that's if the developer wants to
>>> add
>>> a directory afterwards, he don't have to restart his instance.
>> Really? That sounds dodgy if you ask me. Restarts are cheap. With this
>> approach, we have one adapter for each and every package that gets
>> grokked, even if only a small number are even used for templates and
>> browser components.
>   I agree to do so, and started to do it. But after thinking a while, I
> think that five.grok should have exactly the same behaviour than grok
> does. So grok do it like this, we should do it like this. This let
> people learn Grok, and be able to use it Zope 2 (Plone, Silva) and Zope
> 3 with the same knownledge, without to known that's *under that
> platform* so it's slightly different.

I agree. five.grok and grok should behave identically.

I'm happy to revert the change, though I think the Grok behaviour sounds 

>    If you commited your fix, yes please. I use static directory to hold
> resource file in Silva layout now, combined with five.resourceinclude
> and a grokker it's quite powerful.

Yep, will do.

>    But I still have to add test I think, in five.grok, so if you do the
> change you did, this might break.

That'd be good. Though I think it may be better to change grokcore.view 
to not register non-existent resource directories than to ape poor 
behaviour. :)


Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book

More information about the Grok-dev mailing list