[Grok-dev] Re: grok.PageTemplate and content types
faassen at startifact.com
Thu Jan 11 10:56:45 EST 2007
Philipp von Weitershausen wrote:
> I already did this in grok svn, so that changes to filesystem ZPTs
> wouldn't require a Zope 3 restart.
>> 2) Sniff the template content in grok.components.PageTemplate.__init__
>> and to set the content_type attr on the instance accordingly.
> We could make this quite explicit using the file extension, for example.
> 'foo.pt' would be text/html and 'foo.xpt' would be text/xml.
That's too big of a change; people would need to change their extensions
and rename lots of files just because they want to make their templates
XHMTL and add a bit to the header? I'd prefer to reserve different
extensions for different page template engines altogether.
Is the sniffing too magic? Do people trip up because of this in Zope?
More information about the Grok-dev