I have a single view configured to be rendered with multiple renderers
based on Accept header set:
@view_config(accept="application/xml", renderer='template.xml.pt')
@view_config(accept="application/json", renderer='template.json.pt')
@view_config(accept="text/html", renderer='template.html.pt')
def myview():
...
How do I set the Content-Type for the response? At the moment both views
gets rendered as text/html.
I know that I can set request.response_content_type = '...', but that still
leaves me with the problem of detecting which view_config() line is
actually used for the current page.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.