Skip to content

Commit 1ef8a14

Browse files
authored
doc: update flask.md (jaywcjlove#350)
1 parent c0da539 commit 1ef8a14

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/flask.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,14 @@ def getImg():
206206
```py
207207
from flask import Blueprint, abort, jsonify
208208

209-
# 定义Bp2,并定义url前缀为/vedio
210-
Bp2 = Blueprint('vedioBlue', __name__, template_folder='templates', url_prefix='/vedio')
209+
# 定义Bp2,并定义url前缀为/video
210+
Bp2 = Blueprint('videoBlue', __name__, template_folder='templates', url_prefix='/video')
211211

212212

213-
@Bp2.route('/getvedio')
214-
def getVedio():
213+
@Bp2.route('/getvideo')
214+
def getvideo():
215215
try:
216-
return jsonify(name="vedio", size="100GB")
216+
return jsonify(name="video", size="100GB")
217217
except Exception as e:
218218
abort(e)
219219
```
@@ -223,7 +223,7 @@ def getVedio():
223223
```py
224224
from flask import Flask, jsonify
225225
from lantu.img import Bp1
226-
from lantu.vedio import Bp2
226+
from lantu.video import Bp2
227227

228228
app = Flask(__name__)
229229

@@ -250,6 +250,6 @@ curl http://127.0.0.1:5000/
250250
curl http://127.0.0.1:5000/img/getimg
251251
>> {"name": "img", "size": "100KB"}
252252

253-
curl http://127.0.0.1:5000/vedio/getvedio
254-
>> {"name": "vedio", "size": "100GB"}
253+
curl http://127.0.0.1:5000/video/getvideo
254+
>> {"name": "video", "size": "100GB"}
255255
```

0 commit comments

Comments
 (0)