James Gardner already posted how to set the content type when using
the render object in the forum.
response.headers['Content-type'] = "application/atom+xml"
return render("template_file", "atom-feed")
src:
http://groups.google.com/group/pylons-discuss/browse_thread/thread/2e0a6cb533ddd0a6/e2ce72d10277fe99?lnk=gst&q=content+type+xml#e2ce72d10277fe99http://groups.google.com/group/pylons-discuss/browse_thread/thread/2e0a6cb533ddd0a6/e2ce72d10277fe99?lnk=gst&q=content+type+xml#e2ce72d10277fe99
BUT, how would you go about setting the content type for a Response
object?
This worked in 0.9.5, but does not work in 0.9.6.1
xml = '<result>Something</result>'
response = Response(xml)
response.headers['content-type'] = 'text/xml; charset=utf-8'
return response
Any ideas?
Thanks all!
john
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---