@app.route("/")
@app.route("/<slug>")
def index(slug=None):
return render_template('index.html')
This will call index() when url matches "/" or "/anything/here"
@app.route("/<path:slug>")
def catchall(slug=None):
return render_template('catchall.html')
This will call index() when url matches anything else than "/"
By vinyll on Aug. 22, 2012