Skip to content

Commit 5b4ca5d

Browse files
committed
[Django 3.0] ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding'
1 parent f9bcaec commit 5b4ca5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

desktop/core/src/desktop/lib/django_forms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from django.forms.widgets import MultiWidget, Select, TextInput, Textarea, HiddenInput, Input
3434
from django.utils import formats
3535
from django.utils.safestring import mark_safe
36-
from django.utils.encoding import python_2_unicode_compatible
36+
from six import python_2_unicode_compatible
3737

3838
import desktop.lib.i18n
3939
from desktop.lib.i18n import smart_str
@@ -51,7 +51,7 @@
5151
try:
5252
from django.utils.encoding import StrAndUnicode
5353
except ImportError:
54-
from django.utils.encoding import python_2_unicode_compatible
54+
from six import python_2_unicode_compatible
5555

5656
@python_2_unicode_compatible
5757
class StrAndUnicode(object):

0 commit comments

Comments
 (0)