Skip to content

Commit 4dd20b4

Browse files
jannhjieter
authored andcommitted
Replace force_text with force_str (#173)
aliases and force_text is deprecated with Django 3.0
1 parent eacd773 commit 4dd20b4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/bootstrap4/text.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
try:
2-
from django.utils.encoding import force_text
3-
except ImportError:
4-
from django.utils.encoding import force_unicode as force_text
1+
from django.utils.encoding import force_str
52

63

74
def text_value(value):
85
"""Force a value to text, render None as an empty string."""
96
if value is None:
107
return ""
11-
return force_text(value)
8+
return force_str(value)
129

1310

1411
def text_concat(*args, **kwargs):

0 commit comments

Comments
 (0)