New to flask and Flask-Login - ImportError: No module named login

后端 未结 4 999
梦谈多话
梦谈多话 2021-02-13 04:18

It appears that installation of flask-login has issues. Despite a successful install using the below

 pip install flask-login

My app.py file

4条回答
  •  有刺的猬
    2021-02-13 04:48

    There was yet another transition of the way Flask extensions are imported.

    The Flask 0.8 style from flask.ext.login import … is no longer supported, and the even earlier style from flaskext.login import … is also no longer supported.

    Use this way with Flask 1.0 or later:

    from flask_login import LoginManager
    

提交回复
热议问题