Hi Andrew,
Andrew wrote:
> I was wondering how to return a Kid template through
Buffet and
> CherryPy as xml.
Well, this hasn't come up before
> I saw support for this in TurboKid but could not find a
way to pass the
> format parameter to the render function through Buffet.
>
> For now, I tweaked my version of buffet to allow for:
> using_template('template_name', 'format')
>
> But if there's another way to do this, I'd like to
know.
Well, there is another way, but your "tweak"
might be better.
cherrypy.expose
using_template('test')
def index(self):
ct = 'text/xml'
cherrypy.response.headers['Content-type'] = ct
return {'test':'yo!'}
How does TurboGears set the content type? Maybe I should do
something
similar in Buffet, or adopt your tweak.
Christian
http://www.dowski.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|