@app.route
has a connection with function under.Can not take in 1 value from route and have 2 argument in function.
Just to make it clear route is the url in address bar.
@app.route('/user/<user_name>') def foo(user_name): user_name = user_name.capitalize() return render_template('user.html', name=user_name)Call this would be
http://127.0.0.1:5000/user/kent
def foo(user_name, arg):
would give your error.Error:TypeError: foo() missing 1 required positional argument: 'arg'
There are way to get several parameter from route or maybe you mean to get values from the web-site eg html form.It more normal/better to keep route(url call) rather simple,if need many argumet do this in web-site.
Look here for some examples multiple parameters in route.