summaryrefslogtreecommitdiff
path: root/django/contrib/admin/helpers.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2016-09-02 20:17:15 +0200
committerClaude Paroz <claude@2xlibre.net>2016-09-03 13:46:41 +0200
commit2ced2f785d5aca0354abf5841d5449b7a49509dc (patch)
tree46ade22a7c8d9ccdbab4a7fcb25f702172352521 /django/contrib/admin/helpers.py
parentb1d6b0a7b121eec860b518b4903d7c8c74f7773b (diff)
Replaced smart_* by force_* calls whenever possible
The smart_* version should only be used when a lazy string should keep its lazy status.
Diffstat (limited to 'django/contrib/admin/helpers.py')
-rw-r--r--django/contrib/admin/helpers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/admin/helpers.py b/django/contrib/admin/helpers.py
index 3396dc66ad..f808d8a899 100644
--- a/django/contrib/admin/helpers.py
+++ b/django/contrib/admin/helpers.py
@@ -15,7 +15,7 @@ from django.forms.utils import flatatt
from django.template.defaultfilters import capfirst, linebreaksbr
from django.utils import six
from django.utils.deprecation import RemovedInDjango20Warning
-from django.utils.encoding import force_text, smart_text
+from django.utils.encoding import force_text
from django.utils.html import conditional_escape, format_html
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext, ugettext_lazy as _
@@ -209,7 +209,7 @@ class AdminReadonlyField(object):
if hasattr(value, "__html__"):
result_repr = value
else:
- result_repr = smart_text(value)
+ result_repr = force_text(value)
if getattr(attr, "allow_tags", False):
warnings.warn(
"Deprecated allow_tags attribute used on %s. "