lessientelrunya

FlaskRouteVar

Apr 14th, 2017
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. @app.route('/user/<username>')
  2. def show_user_profile(username):
  3.     # show the user profile for that user
  4.     return 'User %s' % username
  5.  
  6. @app.route('/post/<int:post_id>')
  7. def show_post(post_id):
  8.     # show the post with the given id, the id is an integer
  9.     return 'Post %d' % post_id
Add Comment
Please, Sign In to add comment