为啥我这个运行报错显示:AttributeError: module 'app' has no attribute 'rount',大lao们帮我瞅瞅。
# 登录验证
from flask import app, render_template, request, Flask
@app.rount("/")
def index():
return render_template("login.html")
@app.route("/login", methods=['POST'])
def login():
# 接收用户名和密码
# {username:你写的内容 pwd:你写的内容}
username = request.form.get("username")
password = request.form.get("pwd")
if username == "alex" and password == "123":
return "成功"
else:
return "失败"
#login.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form action="/login" method="POST">
用户名 <input type="text" name="username" >
密码 <input type="password" name="pwd" >
<input type="submit" value="登录">
</form>
</body>
</html>