Skip to content

Instantly share code, notes, and snippets.

@nicolaiarocci
Created February 3, 2012 14:02
Show Gist options
  • Save nicolaiarocci/1730312 to your computer and use it in GitHub Desktop.
Save nicolaiarocci/1730312 to your computer and use it in GitHub Desktop.
Let's apply the @mimerender decorator to our function
@mimerender(
default = 'html',
html = render_html,
xml = render_xml,
json = render_json,
txt = render_txt
)
def index():
if request.method == 'GET':
return {'message': 'Hello, World!'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment