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

Jeff Shell eucci.group at gmail.com
Wed Jan 2 08:42:02 EST 2008

On Jan 1, 2008 8:54 PM, Brandon Craig Rhodes <brandon at rhodesmill.org> wrote:
> "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.

Thanks. I actually found both of these documented in an SVN checkout
that I had, since that had a documentation directory which included a
reference. I'm not sure if that exists in the current release at all.
I've heard mention of a new website which should house these docs. I'm
really looking forward to seeing that.

Both options might also be mentioned in the IGrokAPI interface, but
DocGrok doesn't seem to handle Interfaces (as of 0.11). It shows the
Interface class' methods instead of the specification members.

So I think they are mentioned, but I only found the documentation
about both options (after I submitted my question) by searching the
Grok source.

Jeff Shell

More information about the Grok-dev mailing list