📅  最后修改于: 2022-03-11 14:46:40.498000             🧑  作者: Mango
@app.route("/login", methods=["POST", "GET"])
def login():
if request.method == "POST":
user = request.form["name"]
return redirect(url_for("success", name=user))
else:
user = request.args.get("name")
return redirect(url_for("success", name=user))