mitsuhiko/flask — Issue #370: Quickstart: Variable Rules Section
Author: BruceEckel
Created: 2011-12-27 17:47:37+00:00
State: open

If you paste the code from "Variable Rules" into your test app (hello.py), it generates error messages when you go to those URLs. That code needs some fleshing out so that it doesn't break; for example:

@app.route('/user/')
def show_user_profile(username):
# show the user profile for that user
return "foo %s" % username

@app.route('/post/')
def show_post(post_id):
# show the post with the given id, the id is an integer
return "bar %d" % post_id