Skip to content

Commit 3c4f0a3

Browse files
author
Jaap Roes
committed
Import force/smart_str instead of force/smart_text
force_text and smart_text were deprecated in Django 3.0 and are removed in Django 4.0
1 parent 7cbc71d commit 3c4f0a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

imagekit/lib.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def emit(self, record):
4040
# If Django version is under 1.5 then use `force_unicde`
4141
# It is used for compatibility between Python 2 and Python 3
4242
try:
43-
from django.utils.encoding import force_text, force_bytes, smart_text
43+
from django.utils.encoding import (force_str as force_text,
44+
force_bytes,
45+
smart_str as smart_text)
4446
except ImportError:
4547
# Django < 1.5
4648
from django.utils.encoding import (force_unicode as force_text,

0 commit comments

Comments
 (0)