From 4dd20b40aa56d80c99d9aaa1682b8c7fd4728421 Mon Sep 17 00:00:00 2001 From: jannh Date: Wed, 2 Oct 2019 14:50:02 +0200 Subject: [PATCH] Replace force_text with force_str (#173) aliases and force_text is deprecated with Django 3.0 --- src/bootstrap4/text.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/bootstrap4/text.py b/src/bootstrap4/text.py index 50e6105c..b98c5c12 100644 --- a/src/bootstrap4/text.py +++ b/src/bootstrap4/text.py @@ -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):