pycharm建立flask项目不能实时更新文件

很奇怪的一个问题
我用pycharm2017.2建立flask工程,在启动后,修改template下的文件,却不能实时在页面体现出来。
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文件不能实时更新

阅读 5.1k
1 个回答

app.run(debug=True)
开起 debug 模式试试