Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ugettext_lazy has been removed in Django 4.0 #357

Closed
AtitBimali opened this issue Jan 11, 2023 · 3 comments
Closed

ugettext_lazy has been removed in Django 4.0 #357

AtitBimali opened this issue Jan 11, 2023 · 3 comments

Comments

@AtitBimali
Copy link

Django 4.0 Release Note:
django.utils.translation.ugettext(), ugettext_lazy(), ugettext_noop(), ungettext(), and ungettext_lazy() will be removed.

Source: Django's Official

Error:

File "site-packages/notifications/models.py", line 3, in
from .base.models import AbstractNotification, notify_handler # noqa
File "site-packages/notifications/base/models.py", line 14, in
from jsonfield.fields import JSONField
File "site-packages/jsonfield/init.py", line 1, in
from .fields import JSONCharField, JSONField # noqa
File "/site-packages/jsonfield/fields.py", line 8, in
from django.utils.translation import ugettext_lazy as _
ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' (/home/atit/.local/lib/python3.10/site-packages/django/utils/translation/init.py)

Temporary Solution
Use Django version < 4.0

@stefflc
Copy link

stefflc commented Apr 8, 2024

We are also running into this issue. Project is marked as working for Django 4.0 and 4.1, but it is not compatible.

@aarighi
Copy link

aarighi commented Apr 30, 2024

This issue is blocking for us too.

@AlvaroLQueiroz
Copy link
Contributor

Fixed on Version 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants