Flask 用法
简单模板
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
获取参数
-
GET:
1
request.args.get('aaa')
-
POST:
1
request.form["key"]
-
Session:
1
session["key"]
-
Cookie
1 2
username = request.cookies.get('username') resp.set_cookie('username', 'the username')
路径参数
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
跳转
1 2 3 4 5 6 7 |
|