[Grok-dev] Extending Grok with Custom Grokkers
Paul Wilson
paulalexwilson at gmail.com
Fri Dec 5 17:50:05 EST 2008
2008/12/5 Martijn Faassen <faassen at startifact.com>
> Hi there,
>
> Paul Wilson wrote:
> > I am interested in extending grok with custom grokkers for my
> > application's purposes. My intention is to later allow developers to
> > extend my application with their own classes and I'd like to package
> > this functionality separately. I've been looking at megrok.* for
> > inspiration and think I need to include a meta.zcml (along with the
> > usual martian modules). So, am I correct in thinking that Grok uses
> > meta.zcml to register it's grokkers? Is there any documentation on how
> > this works or how to accomplish this?
>
> You could also look at the grokcore.* packages for inspiration. I think
> grokcore.component's structure is nice enough (of course you wouldn't
> need to register the grok ZCML directive as it does in its meta.zcml).
Okay, I'll take a look. Thanks.
>
> Anyway, yes, we use meta.zcml to register the grokkers. meta.zcml will
> get loaded before the main configure.zcml (which contains the grok
> directive) so that the grokkers will be in place in time. If you use
> includeDependencies from z3c.autoinclude (which standard
> grokproject-created projects do), it'll include the meta.zcml first
> automatically when the dependency is listed in setup.py.
Brilliant! Thanks for the hints, I'll have a go and see where I get :-)
>
> There isn't any documentation yet as far as I know (check
> grok.zope.org?), but we'd love contributions!
This is a very crucial part of my project that I'll really have to get to
grips with, so when I've finished working out the details I'll happily write
something!
Thanks,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/grok-dev/attachments/20081205/1d2c43bc/attachment.html
More information about the Grok-dev
mailing list