鍍金池/ 問答/Python  HTML/ pycharm建立flask項目不能實時更新文件

pycharm建立flask項目不能實時更新文件

很奇怪的一個問題
我用pycharm2017.2建立flask工程,在啟動后,修改template下的文件,卻不能實時在頁面體現(xiàn)出來。
hello.py

from flask import Flask
from flask import render_template

app = Flask(__name__)


@app.route('/')
def hello_world():
    return render_template('index.html')


if __name__ == '__main__':
    app.run()

templates/index.html

修改index.html文件不能實時更新

回答
編輯回答
尐懶貓

app.run(debug=True)
開起 debug 模式試試

2018年3月12日 23:31