728x90
## Error
File "/opt/homebrew/lib/python3.11/site-packages/flask_login/utils.py", line 372, in _get_user
current_app.login_manager._load_user()
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Flask' object has no attribute 'login_manager'
Flask __init__.py์ LoginManaer ๋ช ์ ๋ฌธ์
# in __init__.py create_app()
# flask-login ์ ์ฉ
login_manager = LoginManager()
login_manager.login_view = 'auth.sign_in'
login_manager.init_app(app)
๋ฐ์ํ
'๐ Python' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Python] importlib ์ฌ์ฉ์ ์ ์ ๋ฆฌ๋ก๋ (0) | 2023.08.25 |
---|---|
Flask - secret_key (1) (0) | 2023.08.09 |
[PEP 703] Making the Global Interpreter Lock Optional in CPython (0) | 2023.07.09 |
[DigitalOcean] Slack_bolt deploy runtime error (0) | 2023.06.26 |
On the amortized complexity of approximate counting (0) | 2023.06.20 |