[Grok-dev] template association - suboptimal magic?

Martijn Faassen faassen at startifact.com
Wed Sep 10 06:42:29 EDT 2008

Lennart Regebro wrote:
> On Fri, Sep 5, 2008 at 00:30, Jan-Wijbrand Kolman <janwijbrand at gmail.com> wrote:
>> * The grok.template() directive sets a template name explicitly:
>> class ViewA(grok.View):
>>  grok.template('sometemplatename')
> This seems overly complex. If we don't have magic association, then
> class ViewA(grok.View):
>     template = PageTemplateFile('file/path')
> seems perfectly useable and 100% non-magic to me. 

Besides breaking every Grok application in existence (something that 
JW's proposal + tweak doesn't do), it also requires typing of path names 

I'd like the case:

class ViewA(grok.View):

to continue to work. The philosophy of Grok is to have defaults using 
defaulting rules, and directives are the way to implement such 
defaulting rules.



More information about the Grok-dev mailing list