[Grok-dev] overriding Grokkers

Lennart Regebro regebro at gmail.com
Fri Oct 19 07:39:40 EDT 2007


On 10/16/07, Fernando Correa Neto <fcdoth at gmail.com> wrote:
> Where megrok.buffet.View subclass grok.View.
> Why I decided to do it with grok.View? Because this is where it calls
> the zpt and renders it so I thought wiring up buffet code in there
> would be the right place.

But that would require you to have different view classes for
different template classes, so no, it still isn't the right place.

I would like to see another usecase before I make my mind up if this
is needed or not. Normally you make a grokker because you have a class
whose instances should all have something done to them. If that
grokker does something that not all subclasses want done, then either
the grokker is wrong, or you are using the subclass in a way that
wasn't intended, IMO.

-- 
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64


More information about the Grok-dev mailing list