[Grok-dev] Re: grok.PageTemplate and content types

Rocky Burt rocky at serverzen.com
Fri Jan 12 09:31:41 EST 2007


On Fri, 2007-12-01 at 15:27 +0100, Philipp von Weitershausen wrote:
> Jan-Wijbrand Kolman wrote:
> > class Foo(grok.View):
> >     grok.template('specialfoo', mime_type='application/xml')
> > 
> > and
> > 
> > grok.PageTemplate("""\
> >     <html>
> >     ...
> >     </html>
> >     """, mime_type="application/xml")
> > 
> > Would that work?
> 
> Sure, that would work for me, except I'd suggest calling it content_type 
> as that seem sto be used by zope.pagetemplate itself.

Sorry, I must speak up here.  I adamantly recommend against using
content_type.  This gets *sooooo* confusing when dealing with systems
that are built to work with or supporting CMSs.  Use mime type... much
more obvious and clean imho.

- Rocky


-- 
Rocky Burt
ServerZen Software -- http://www.serverzen.com
News About The Server (blog) -- http://www.serverzen.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20070112/82dae1f0/attachment-0002.bin


More information about the Grok-dev mailing list