Skip to content

Instantly share code, notes, and snippets.

@dirn
Created January 14, 2014 21:11
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 dirn/8425805 to your computer and use it in GitHub Desktop.
Save dirn/8425805 to your computer and use it in GitHub Desktop.
from flask import Flask, url_for
app = Flask(__name__)
@app.route('/')
def index():
return url_for('view', id=5)
@app.route('/item/<id>')
def view(id):
return str(id)
if __name__ == '__main__':
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment