Open
Description
Installed apps have following apps installed:
# django-allauth==65.3.1
# django-allauth-2fa==0.11.1
INSTALLED_APPS = [
...
'allauth',
'allauth.account',
'allauth_2fa',
]
When importing OTPAdapter
it throws following exception.
./manage.py shell
Python 3.11.5 (main, Nov 21 2024, 22:26:00) [Clang 16.0.0 (clang-1600.0.26.4)] on darwin
>>> from allauth_2fa.adapter import OTPAdapter
/Users/user/project/.venv/lib/python3.11/site-packages/allauth/exceptions.py:9: UserWarning: allauth.exceptions is deprecated, use allauth.core.exceptions
warnings.warn("allauth.exceptions is deprecated, use allauth.core.exceptions")
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Users/user/project/.venv/lib/python3.11/site-packages/allauth_2fa/adapter.py", line 7, in <module>
from allauth.socialaccount.models import SocialLogin
File "/Users/user/project/.venv/lib/python3.11/site-packages/allauth/socialaccount/models.py", line 26, in <module>
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: allauth.socialaccount not installed, yet its models are imported.
But socialauth
should be optional unless it is really required.
Metadata
Assignees
Labels
No labels
Activity