@app.route('/users/<userid:int>/edit') @userid_must_match def users_edit(): # ... handle view for matching user