Flask cli can't import application set with FLASK_APP

前端 未结 2 520
逝去的感伤
逝去的感伤 2021-01-19 06:06

Following the Flask 0.11 documentation, I cloned the Flask repo, created a virtualenv, and installed Flask via pip install flask. I went into the example

2条回答
  •  旧时难觅i
    2021-01-19 06:51

    I was setting FLASK_APP=flaskr. Since I hadn't installed my app as a package in my virtualenv, I needed to add the .py extension.

    export FLASK_APP=flaskr.py
    

提交回复
热议问题