[Grok-dev] Re: Sharing a common template layout?
Martijn Faassen
faassen at startifact.com
Fri Jan 19 07:05:10 EST 2007
Christian Theune wrote:
> Hi,
>
> Am Donnerstag, den 18.01.2007, 09:33 +0100 schrieb Jan-Wijbrand Kolman:
>>> Is there a Grok way to share a common template layout?
>> One thing you can do is to use the grok.templatedir(...) directive on
>> a module level. So say you have a module 'bar.py' and a template
>> directory called 'foo' with and 'index.pt' in it, in bar.py you can
>> say:
>>
>> import grok
>> grok.templatedir('foo')
>
> That has unwanted side-effects IMHO. This will make *all* templates of
> foo and bar available from a shared space. This has the same drawbacks
> as templates in the skin mechanism in CMF.
I'm looking for arguments to actually disallow automatic template
association without associated view class (raise a GrokError), and this
is one.
Regards,
Martijn
More information about the Grok-dev
mailing list