[Grok-dev] Re: SVN: grok/trunk/ Merge the faassen-rest branch. see doc/minitutorials/rest.txt for

Philipp von Weitershausen philipp at weitershausen.de
Sat Oct 27 12:59:24 EDT 2007


Martijn Faassen wrote:
> Log message for revision 81122:
>   Merge the faassen-rest branch. see doc/minitutorials/rest.txt for
>   usage information.

Very very cool!

> +    
> +class RESTGrokker(martian.ClassGrokker):
> +    component_class = grok.REST
> +    
> +    def grok(self, name, factory, context, module_info, templates):

Note that this violates the IGrokker interface from Martian: Grokkers 
must accept at the very least (name, obj, **kw). So you're certainly 
missing a **kw here. Also, from looking at your grokker implementation, 
I gather the 'templates' parameter is superfluos and should be absorbed 
by the **kw, because the grokker shouldn't rely on always getting it 
passed in if it doesn't need it.

Don't worry about fixing anything now, I'll get to this when I merge the 
gotcha-configuration-actions branch. Just wanted to make you and others 
who implement grokkers aware :).


-- 
http://worldcookery.com -- Professional Zope documentation and training


More information about the Grok-dev mailing list