Warning message while running Flask

后端 未结 9 1549
有刺的猬
有刺的猬 2020-12-07 13:07

While I am running Flask code from my command line, a warning is appearing:

Serving Flask app \"hello_flask\" (lazy loading)
* Environment: production
  WARN         


        
9条回答
  •  爱一瞬间的悲伤
    2020-12-07 13:55

    I have been using flask for quite some time now, and today, suddenly this warning turned up. I found this.

    As mentioned here, as of flask version 1.0 the environment in which a flask app runs is by default set to production. If you run your app in an older flask version, you won't be seeing this warning.

    New in version 1.0.

    Changelog

    The environment in which the Flask app runs is set by the FLASK_ENV environment variable. If not set it defaults to production. The other recognized environment is development. Flask and extensions may choose to enable behaviors based on the environment.

提交回复
热议问题