[Grok-dev] Re: first thoughts on "regebro-guido-templates"

Martijn Faassen faassen at startifact.com
Tue Oct 30 09:36:20 EDT 2007


On 10/30/07, Lennart Regebro <regebro at gmail.com> wrote:
> On 10/30/07, Martijn Faassen <faassen at startifact.com> wrote:
> > I just thought of a potential drawback. In the current design,
> > overriding namespace() on the template level has no particular
> > requirements. You just need to return a dictionary. Your change if I
> > understand it correctly, would add calling the view's namespace() for
> > all template developers. So you might save a few lines now, but you're
> > adding lines, and required knowledge and calls, for all template
> > language developers.
> >
> > If my analysis is correct, I'm -1 to this change.
> Not really, since I just move that requirement from the render method
> to the namespace method. And the render method will most likely always
> need to be overridden in the template class, while the namespace
> method only needs to be overriden if you want another default
> namespace than view/context/request/static.

True, I hadn't considered that. What about introducing a new method
that does the combination, so that there's no requirement for the
person writing the plugin anywhere?



More information about the Grok-dev mailing list