[Grok-dev] template association - suboptimal magic?

Jan-Wijbrand Kolman janwijbrand at gmail.com
Fri Sep 5 04:38:00 EDT 2008

Lennart Regebro wrote:
> On Fri, Sep 5, 2008 at 00:30, Jan-Wijbrand Kolman <janwijbrand at gmail.com> wrote:
>> * Since template registries are tied to modules a template defined on a
>> component in one module cannot be used by sublcasses of this component
>> defined in an other module. This results in a unexpected and difficult
>> to solve situation for the application developer (the original issue I
>> tried to solve).
> Yeah, this is unexpected. But I thought it was because the template
> was adapted to the class, not the interface, and hence the view lookup
> during traversal would fail? Maybe I misunderstood that.

It has nothing to do with adaptation - it during grok-time that the
template association with a subclassed view fails.

> I thinks thats OK, and expected. But the argument that the template
> magic has become to complex is hard to deny, and maybe this should be
> made more explicit. I do have to say that I never liked the
> x_templates magic, but changing this does break every single Grok
> application in existence. ;)

Just to be clear: it won't break in my proposal, since I propose to
still look in x_templates by default for the templates unless overridden
by a grok.templatedir() in the module.


More information about the Grok-dev mailing list