from flask import request,Flask
@app.route('/login', methods=['GET', 'POST'])
def login():
if request.method == 'GET':
return do_the_login()
else:
return show_the_login_form()
将do_the_login()和show_the_login_form()函数写出,在终端输入flask run,将产生网址+/login在任意浏览器输入,即可使用。