demiroren-teknoloji / django-admin-autocomplete-list-filter

Ajax autocomplete list filter for Django admin
MIT License
83 stars 31 forks source link

Getting ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' on Django>=4.X #12

Closed kodekracker closed 6 months ago

kodekracker commented 2 years ago

Version: django-admin-autocomplete-list-filter = "1.0.1"

Stacktrace

  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File ".venv/lib/python3.8/site-packages/djaa_list_filter/admin.py", line 13, in <module>
    from django.utils.translation import ugettext_lazy as _
ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' (.venv/lib/python3.8/site-packages/django/utils/translation/__init__.py)

django.utils.translation.ugettext(), ugettext_lazy(), ugettext_noop(), ungettext(), and ungettext_lazy() are removed in Django 4.0 https://docs.djangoproject.com/en/4.0/releases/4.0/#features-removed-in-4-0

keyvanm commented 2 years ago

It seems to be fixed on the main branch. Maybe they haven't released it to PyPI yet?

cash commented 2 years ago

@demirorenteknoloji Do you plan to make another release to PyPI based on the main branch to support Django 4.0?

cash commented 1 year ago

@vigo any plans to make another release to PyPI to support Django 4.0?

vigo commented 1 year ago

hi @cash , i'm super sorry, i couldn't take care of this package. right now, i have some time to fix this, i'll to my best as fast as i can.

cash commented 1 year ago

@vigo Thanks. The master branch works with Django 4.0. It just needs a new release pushed to PyPI as the current release does not have this commit: https://github.com/demiroren-teknoloji/django-admin-autocomplete-list-filter/commit/239fca057b9aa29e92806fbaf2bb955f9fa8bedd

YolCruz commented 1 year ago

what is the status of this? I'm still getting this error

vigo commented 6 months ago

this project is deprecated, enjoy: https://github.com/vigo/django-admin-list-filter

Ehco1996 commented 6 months ago

this project is deprecated, enjoy: https://github.com/vigo/django-admin-list-filter

u are hero 🎉

vigo commented 6 months ago

thank you