django-two-factor-auth
django-two-factor-auth copied to clipboard
cannot import name 'ugettext_lazy' from 'django.utils.translation'
When attempting to start the example with python manage.py runserver I get the error
from django.utils.translation import ugettext_lazy as _
ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation'
Expected Behavior
Running the example should work.
Current Behavior
There is an error
Possible Solution
The requirement versions were unblock and pip is installing django 4, and django-user-session doesn't seems to be compatible with Django 4.0. ugettext_lazy has been removed.
- Update django-user-session to support django 4.0, see: https://github.com/jazzband/django-user-sessions/pull/142
- Fix the version of django to 3.2 until 4.0 is properly supported.
pip install django==3.2is a temporary workaround for the issue.
Steps to Reproduce (for bugs)
- pip install -r requirements_dev.txt
- cd example
- python manage.py runserver
Your Environment
- Browser and version: N/A
- Python version: 3.10
- Django version: 4.0
- django-otp version: N/A
- django-two-factor-auth version: N/A
- Link to your project: N/A