[Grok-dev] Re: RFC: Making the automatic registration of
templates more explicit
Jan-Wijbrand Kolman
janwijbrand at gmail.com
Wed Jan 31 14:14:07 EST 2007
> The advance of the method JW proposed would be that you can *see* which
> templates are in play by just looking at the Python code.
And actually, the more I think about it, the more I see it as an
important advantage! But see my remark later on.
> The drawback
> of the current method, and grok.autotemplates, is that you still don't
> know which templates are really in play unless you go look at a
> directory and compare it with the Python file and think hard which
> templates are there which are not represented by Python.
>
> The nice thing about grok.autotemplates() is that we would turn this
> *off* by default. The alternative JW proposes would be to turn this off
> entirely and only allow explicit template references, with a slightly
> shorter spelling.
We can allow for both mechanisms(?) Just like with the form fields:
you define them yourself explicitly, or you use some automatic thingy
to set them up for you.
> Does this mean JW that you think the automatic
> association is something you'd never want?
Not sure. I know that I would not mind having to declare multiple
templates in my module. And I do think I would not have the tendency
to wrap it up in a function only to end up with an
grok.autotemplates() equivalent.
In other words: if there never had been any automatic association of
templates, I would not have missed it. I personally like explicit
declarations, and grok makes these declarations short and easy.
regards,
jw
--
Jan-Wijbrand Kolman
More information about the Grok-dev
mailing list