Skip to content

Instantly share code, notes, and snippets.

@DasIch
Created June 17, 2013 14:13
Show Gist options
  • Save DasIch/5797174 to your computer and use it in GitHub Desktop.
Save DasIch/5797174 to your computer and use it in GitHub Desktop.
from flask import Flask, url_for
app = Flask(__name__)
@app.route('/', defaults={'page_no': 1})
@app.route('/<int:page_no>')
def main(page_no):
print url_for('main', page_no=2)
return unicode(page_no)
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment