Guest User

Untitled

a guest
Feb 20th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. def get():
  2. # Get data from source
  3. db.get(some_id)
  4.  
  5. # Do work on data here
  6.  
  7. if header.accept == "text/html":
  8. render('data.html', data)
  9. elif header.accept == "application/json":
  10. render('data.json', data)
Add Comment
Please, Sign In to add comment