Reload Flask app when template file changes

前端 未结 10 1639
栀梦
栀梦 2020-11-27 13:04

By default, when running Flask application using the built-in server (Flask.run), it monitors its Python files and automatically reloads the app if its code cha

10条回答
  •  Happy的楠姐
    2020-11-27 13:21

    you can use

    TEMPLATES_AUTO_RELOAD = True
    

    From http://flask.pocoo.org/docs/1.0/config/

    Whether to check for modifications of the template source and reload it automatically. By default the value is None which means that Flask checks original file only in debug mode.

提交回复
热议问题