AttributeError: module 'request' has no attribute 'args'
我在看flask教学视频
模仿里面的代码
@app.route('/login/')
def login():
print(request.args)
print(request.args.get('q1'))
return render_template('login.html')
login.html里
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>登陆页面</title>
</head>
<body>
<a href={{ url_for('login',q1='fio',q2='ole',q3='love for ever') }}>点我搜索</a>
</body>
代码和视频基本一样,结果运行显示此帖标题字样,我的是py3.x,不知道是不是这个原因,没有args这个方法