[Grok-dev] @grok.traverse versus traverse

Martijn Faassen faassen at infrae.com
Thu Oct 19 06:03:12 EDT 2006

Hi there,

I saw that Philipp implemented the @grok.traverse decorator (and the 
grok.Traverse base class), cool!

I wondered though whether a decorator to mark the traverse is really 
needed. Alternatively we could just have an optional 'traverse' method 
on models. This means that there's no more need to check whether 
traverse is defined multiple times and the like.

This would follow the same pattern as we did with 'before' on views, 
when we went from decorator to method. I'd suggest as a design rule we 
only use decorators if there's no sane method-based solution.



More information about the Grok-dev mailing list