[Grok-dev] Re: ClassGrokkers and component_class and component base
classes
Philipp von Weitershausen
philipp at weitershausen.de
Wed Feb 7 07:14:16 EST 2007
On 7 Feb 2007, at 11:35 , Jan-Wijbrand Kolman wrote:
>> In general I think it'd be useful to be able to tell grok "don't grok
>> this thing". There is undocumented behaviour in the
>> GrokkerRegistry that
>> makes sure classes whose names end in "Base" aren't grokked, but I
>> think
>> something more powerful is necessary.
>
> Well, actually adding a class level grok.baseclass() directive (or
> having the class name end in 'Base', but I like the directive slightly
> better) does work indeed and was what I was looking for. I even knew
> it existed, but somehow I got confused somewhere along the line.
I think I'd prefer a general grok.ignore() directive that can be used
on a class:
class BaseView(grok.View):
grok.ignore()
or on a module:
grok.ignore() # don't grok this module
or from outside a module:
grok.ignore('dont.grok.this.module')
More information about the Grok-dev
mailing list