[Grok-dev] Making a custom base View class derived from grok.View?

Brandon Craig Rhodes brandon at rhodesmill.org
Tue Jan 1 22:54:22 EST 2008


"Jeff Shell" <eucci.group at gmail.com> writes:

> The class just looks like this:
>
> class View(grok.View):
>     """ Mixture of Grok Views with br.ez Views """
>     ...
>
> Is there an easy way to tell Grok that this is an abstract base View?

(a) You can append "Base" to the name.  I myself strongly dislike this
    "feature"; it keeps tripping people up and it doesn't seem to be
    mentioned anywhere.  But it's one way to get your class ignored.

(b) You can say "grok.baseclass()" inside the class definition and it
    will, if I'm thinking straight, be ignored.  I like this.

-- 
Brandon Craig Rhodes   brandon at rhodesmill.org   http://rhodesmill.org/brandon


More information about the Grok-dev mailing list