diff options
author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2017-01-26 10:08:08 +0100 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2019-02-06 14:12:06 -0500 |
commit | 3bb6a4390c0a57da991fcb1c0642b9b3fccff751 (patch) | |
tree | f958fe5cf95e3a5285e3bb595da4f7cf27567d58 /django/views/debug.py | |
parent | 24b82cd201e21060fbc02117dc16d1702877a1f3 (diff) | |
download | django-3bb6a4390c0a57da991fcb1c0642b9b3fccff751.tar.gz |
Refs #27753 -- Favored force/smart_str() over force/smart_text().
Diffstat (limited to 'django/views/debug.py')
-rw-r--r-- | django/views/debug.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/views/debug.py b/django/views/debug.py index 0efaf0c6af..601aca57af 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -11,7 +11,7 @@ from django.template.defaultfilters import pprint from django.urls import Resolver404, resolve from django.utils import timezone from django.utils.datastructures import MultiValueDict -from django.utils.encoding import force_text +from django.utils.encoding import force_str from django.utils.module_loading import import_string from django.utils.version import get_docs_version @@ -280,7 +280,7 @@ class ExceptionReporter: end = getattr(self.exc_value, 'end', None) if start is not None and end is not None: unicode_str = self.exc_value.args[1] - unicode_hint = force_text( + unicode_hint = force_str( unicode_str[max(start - 5, 0):min(end + 5, len(unicode_str))], 'ascii', errors='replace' ) |