[Grok-dev] Re: Using martian to load schemata

Martin Aspeli optilude at gmx.net
Wed Jun 25 12:02:16 EDT 2008

Martin Aspeli <optilude <at> gmx.net> writes:

> Can anyone tell me whether Martian would be worth exploring here? Or do I
> need something else that's more aware of the Zope 3 CA? I don't fully 
> understand how to react once the CA is loaded, though I'm guessing I should 
> be using zope.configuration actions in some way and ensure that my actions
> execute late in the process?

I've been digging around martian and grokcore.component. I see how
grokcore.component uses configuration actions via a 'config' variable. I 
*think* I could do something similar, e.g.

class IPage(Schema):

where Schema would be a grokkable base class and model would be a martian

What I haven't quite understood, is where the 'config' parameter in e.g. the
AdapterGrokker's execute() method comes from. I guess it has something to do
with directive.bind(), but I got a bit lost in the code at that point.

I'm also not quite sure how to use config.action() to ensure that my 
particular callable gets executed after all standard components have been set
up, though I guess that's a zope.configuration question?

Any hints?


More information about the Grok-dev mailing list