Django 4 has replaced force_text with force_url
Issue #84
resolved
This breaks the mixin:
server_1 | from django_datatables_view.base_datatable_view import BaseDatatableView
server_1 | File "/usr/local/lib/python3.10/site-packages/django_datatables_view/base_datatable_view.py", line 7, in <module>
server_1 | from .mixins import JSONResponseView
server_1 | File "/usr/local/lib/python3.10/site-packages/django_datatables_view/mixins.py", line 8, in <module>
server_1 | from django.utils.encoding import force_text # Django 1.5 / python3
server_1 | ImportError: cannot import name 'force_text' from 'django.utils.encoding' (/usr/local/lib/python3.10/site-packages/django/utils/encoding.py)
https://docs.djangoproject.com/en/4.0/ref/utils/#module-django.utils.encoding
Comments (9)
-
-
I switched to this.
-
Thanks a lot for the info. That was exactly what I was looking for.
-
@ogawa-k I got some improvements merged, maybe you want to include them in your repo?
-
I pushed a PR and assigned @Maciej Wisniowski - my google research showed that
force_str
would be the appropriate replacement.
-
@Maciej Wisniowski Could you maybe release a new version when this is merged?
-
repo owner - changed status to resolved
This is fixed in 1.20.0
-
repo owner @Ronny Vedrilla I have released 1.20.0 today and it fixes that. Thanks for your help!
-
@Maciej Wisniowski Awesome! Thx so much ❤
- Log in to comment
Looks like this repo is no longer maintained. Does anyone know of a fork that has this fix?