ulule/django-linguist

in django 4.0 there is no force_text

JayabalM opened this issue · 1 comments

Getting following error when working with Django 4.0

linguist/utils.py", line 10, in <module>
    from django.utils.encoding import force_text
ImportError: cannot import name 'force_text' from 'django.utils.encoding'

Because there is no force_text in Django 4.0 instead use force_str

Solution:

replace

from django.utils.encoding import force_text

to

from django.utils.encoding import force_str

thoas commented

hi,

use current master until the next release, thanks.