Browse Source

Django 2.0 fixes.

master
Erik Stein 7 years ago
parent
commit
a36a5d517e
  1. 4
      shared/utils/text.py
  2. 2
      shared/utils/translation.py

4
shared/utils/text.py

@ -7,7 +7,7 @@ import re
from django.utils import six
from django.utils.encoding import force_text
from django.utils.functional import allow_lazy, keep_lazy_text
from django.utils.functional import keep_lazy, keep_lazy_text
from django.utils.safestring import SafeText
from django.utils.html import mark_safe
from django.utils.text import slugify
@ -44,7 +44,7 @@ slugify_german = slugify_long
# Works only with Python >= 3.4
def html_entities_to_unicode(html_str):
return html.unescape(html_str)
html_entities_to_unicode = allow_lazy(html_entities_to_unicode, six.text_type, SafeText)
# html_entities_to_unicode = allow_lazy(html_entities_to_unicode, six.text_type, SafeText)
# Translators: This string is used as a separator between list elements

2
shared/utils/translation.py

@ -8,7 +8,7 @@ from contextlib import contextmanager
from django import http
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist, FieldDoesNotExist
from django.core.urlresolvers import translate_url
from django.url.base import translate_url
from django.http import HttpResponseRedirect
from django.template.loader import select_template
from django.utils import translation

Loading…
Cancel
Save