1、路由:
@app.route("/", methods = ("GET","POST"))
2、视图函数
@app.route(:"/",methods = ("GET","POST"))
def index():
return "123"
3、返回值:
1. Response "test"
2. from flask import render_template
render_template return render_template("index.html") #默认情况下模板存放在 templates
3. from flask import redirect
return redirect("/login")
4. from flask import send_file
return send_file(file_name)
5.
原文:https://www.cnblogs.com/zhx-95-/p/14698602.html