Skip to content

Commit

Permalink
Replace force_text with force_str (#173)
Browse files Browse the repository at this point in the history
aliases and force_text is deprecated with Django 3.0
  • Loading branch information
jannh authored and jieter committed Oct 2, 2019
1 parent eacd773 commit 4dd20b4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/bootstrap4/text.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
try:
from django.utils.encoding import force_text
except ImportError:
from django.utils.encoding import force_unicode as force_text
from django.utils.encoding import force_str


def text_value(value):
"""Force a value to text, render None as an empty string."""
if value is None:
return ""
return force_text(value)
return force_str(value)


def text_concat(*args, **kwargs):
Expand Down

0 comments on commit 4dd20b4

Please sign in to comment.