from flask import Flask,render_templateapp = Flask(__name__)@app.route('/')def hello_world(): return render_template('include.html')if __name__ == '__main__': app.run(debug=True)
知了课堂 #主模板 { % include 'common/header.html' %}中间的{ % include 'common/footer.html' %}
#header公用的部分封装起来
#footer公用的部分封装