Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

cannot import name AnonymousUser :: breaks with flask-login 0.2.2 #122

Closed
1xch opened this issue Jun 18, 2013 · 2 comments
Closed

cannot import name AnonymousUser :: breaks with flask-login 0.2.2 #122

1xch opened this issue Jun 18, 2013 · 2 comments

Comments

@1xch
Copy link

1xch commented Jun 18, 2013

from flask.ext.security import current_user
File "/home/zv/.virtualenvs/j/local/lib/python2.7/site-packages/flask/exthook.py", line 81, in load_module
reraise(exc_type, exc_value, tb.tb_next)
File "/home/zv/.virtualenvs/j/local/lib/python2.7/site-packages/flask_security/__init__.py", line 15, in <module>
from .core import Security, RoleMixin, UserMixin, AnonymousUser, current_user
File "/home/zv/.virtualenvs/j/local/lib/python2.7/site-packages/flask_security/core.py", line 13, in <module>
from flask.ext.login import AnonymousUser as AnonymousUserBase, ImportError: cannot import name AnonymousUser
@1xch
Copy link
Author

1xch commented Jun 18, 2013

I think the name is AnonymousUserMixin now
https://github.com/maxcountryman/flask-login/blob/master/flask_login.py#L415

@mattupstate
Copy link
Collaborator

This is a duplicate of #119 Please refer to that issue for now.

galeo pushed a commit to galeo/flask-security-outdated that referenced this issue Mar 4, 2020
- Improve documentation for :meth:`.UserDatastore.create_user` to make clear that hashed password
  should be passed in.
- Improve documentation for :class:`.UserDatastore` and :func:`.verify_and_update_password`
  to make clear that caller must commit changers to DB if using a session based datastore.
- (:issue:`122`) Clarify when to use ``confirm_register_form`` rather than ``register_form``.
- Fix bug in 2FA that didn't commit DB after using `verify_and_update_password`.
- Fix bug(s) in UserDatastore where changes to user ``active`` flag weren't being
  added to DB.

 closes: pallets-eco#122
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants