summaryrefslogtreecommitdiff
path: root/django/templatetags
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-02-07 09:17:38 +0100
committerClaude Paroz <claude@2xlibre.net>2017-02-07 17:14:02 +0100
commit3a148f958dddd97c1379081118c30fbede6b6bc4 (patch)
treec80d2aedaac8311898d1e7557623b7a0758ec6dd /django/templatetags
parent854f6950149e84d4c4bcbe98b7459084b44a6b9a (diff)
Refs #27795 -- Removed force_text from the template layer
Thanks Tim Graham for the review.
Diffstat (limited to 'django/templatetags')
-rw-r--r--django/templatetags/l10n.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/django/templatetags/l10n.py b/django/templatetags/l10n.py
index 956b2e9019..8760e7e2b8 100644
--- a/django/templatetags/l10n.py
+++ b/django/templatetags/l10n.py
@@ -1,6 +1,5 @@
from django.template import Library, Node, TemplateSyntaxError
from django.utils import formats
-from django.utils.encoding import force_text
register = Library()
@@ -11,7 +10,7 @@ def localize(value):
Forces a value to be rendered as a localized value,
regardless of the value of ``settings.USE_L10N``.
"""
- return force_text(formats.localize(value, use_l10n=True))
+ return str(formats.localize(value, use_l10n=True))
@register.filter(is_safe=False)
@@ -20,7 +19,7 @@ def unlocalize(value):
Forces a value to be rendered as a non-localized value,
regardless of the value of ``settings.USE_L10N``.
"""
- return force_text(value)
+ return str(value)
class LocalizeNode(Node):