[Product-Developers] grok doesn't "grok" file as expected

Alex Clark aclark at aclark.net
Sat Jan 22 23:44:04 UTC 2011


On 1/22/11 6:16 PM, Dominik wrote:
>
> Hi,
>
> I read Martins manual about grok
> http://plone.org/products/dexterity/documentation/manual/five.grok and
> wanted to try it myself. But it seems I miss something.
> First I added
>
> <grok:grok package="." />
>
> to my configure.zcml. But my viewlet in viewlet.py didn't work that way.
> After reading
> http://vincentfretin.ecreall.com/articles/using-five.grok-to-add-viewlets
> I change the configure.zcml to
>
> <grok:grok package=".viewlet" />
>
> Now the viewlet works but the files in static are no longer available.


"files in static" ? I'm not sure what that means, unless you mean "other 
modules in the directory"

IIUC, grok:grok package="." should grok all modules in the current 
directory, including your viewlet.py… but I've not played with this much.

Worst case, you should be able to configure components with ZCML.




>
> What am I doing wrong? The example at
> http://svn.zope.org/grokapps/SimpleViewletDemo/src/simpleviewletdemo/configure.zcml?rev=86566&view=auto
> is also using<grok:grok package="." />
>
> cheers
> Dominik


-- 
Alex Clark · http://aclark.net
Author · http://aclark.net/admin




More information about the Product-Developers mailing list