morlandi / django-ajax-datatable

A Django app which provides the integration of a Django project with the jQuery Javascript library DataTables.net
MIT License
204 stars 64 forks source link

Support for Django 4.0 #51

Closed fraimondo closed 2 years ago

fraimondo commented 2 years ago

Currently, this happens when using it in a project with Django 4.0a1

  File "/Users/fraimondo/anaconda3/envs/microbiom/lib/python3.9/site-packages/ajax_datatable/columns.py", line 2, in <module>
    from django.utils.translation import ugettext_lazy as _
ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' (/Users/fraimondo/anaconda3/envs/microbiom/lib/python3.9/site-packages/django/utils/translation/__init__.py)

This is because these functions where deprecated in Django 3.0:

https://docs.djangoproject.com/en/dev/releases/3.0/#deprecated-features-3-0

I guess it's just a matter of removing the u

fraimondo commented 2 years ago

Check #52

morlandi commented 2 years ago

Supporting Django 4.0 is good, but we still need to support Django 3 as well. I do believe #52 needs some improvement; let's close this issue and discuss #52 instead