doc: update flask logo.
This commit is contained in:
parent
0f18fbac08
commit
e781a3b20e
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
@ -157,12 +157,12 @@ with app.test_request_context():
|
|||||||
|
|
||||||
### HTTP 方法
|
### HTTP 方法
|
||||||
|
|
||||||
默认情况下,路由仅响应 `GET` 请求。您可以使用 `route()` 装饰器的方法参数来处理不同的 `HTTP` 方法
|
默认路由仅响应 `GET` 请求。可以使用 `route()` 装饰器的方法参数来处理不同的 `HTTP` 方法
|
||||||
|
|
||||||
```py
|
```py
|
||||||
from flask import request
|
from flask import request
|
||||||
|
|
||||||
@app.route('/login', methods=['GET', 'POST'])
|
@app.route('/login',methods=['GET','POST'])
|
||||||
def login():
|
def login():
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
return do_the_login()
|
return do_the_login()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user