Skip to content

Instantly share code, notes, and snippets.

@keleshev
Created March 26, 2014 11:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keleshev/9780931 to your computer and use it in GitHub Desktop.
Save keleshev/9780931 to your computer and use it in GitHub Desktop.
@app.route('/<int:id>')
def my_view(id):
player = Player.get(id)
yield player.as_json, 200
player.update_stats() # Called *after* the response is made.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment