📜  如何在烧瓶中返回 html 文件 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:12.247000             🧑  作者: Mango

代码示例1
from flask import Flask, render_template

app = Flask(__name__)
@app.route("/")
def index():
    return render_template('index.html') # You have to save the html files
                                         # inside of a 'templates' folder.
    
app.run(debug=True)