Upgrade to Django 3.0 and other dependencies (#1568)

* Upgrade Django to 3.0 and other dependencies to recent versions

* Fix otp version contsraint

* Remove six dependency

* Resolve some warnings

* Fix failing tests

* Update django-countries

* Resolve all RemovedInDjango31Warnings in test suite

* Run isort

* Fix import

* Update PostgreSQL version on travis
This commit is contained in:
Raphael Michel
2020-03-23 15:02:20 +01:00
committed by GitHub
parent 7e9c9beace
commit af23d6e4bf
174 changed files with 380 additions and 380 deletions

View File

@@ -1,5 +1,5 @@
from django.template.defaultfilters import date as _date
from django.utils.translation import get_language, ugettext_lazy as _
from django.utils.translation import get_language, gettext_lazy as _
def daterange(df, dt):

View File

@@ -7,3 +7,8 @@ def merge_dicts(*dict_args):
for dictionary in dict_args:
result.update(dictionary)
return result
def move_to_end(d, k):
v = d.pop(k)
d[k] = v

View File

@@ -1,5 +1,4 @@
from django.utils import six
from django.utils.encoding import force_text
from django.utils.encoding import force_str
from django.utils.functional import keep_lazy
from django.utils.safestring import SafeText, mark_safe
@@ -19,13 +18,13 @@ _json_escapes_attr = {
}
@keep_lazy(six.text_type, SafeText)
@keep_lazy(str, SafeText)
def escapejson(value):
"""Hex encodes characters for use in a application/json type script."""
return mark_safe(force_text(value).translate(_json_escapes))
return mark_safe(force_str(value).translate(_json_escapes))
@keep_lazy(six.text_type, SafeText)
@keep_lazy(str, SafeText)
def escapejson_attr(value):
"""Hex encodes characters for use in a html attributw script."""
return mark_safe(force_text(value).translate(_json_escapes_attr))
return mark_safe(force_str(value).translate(_json_escapes_attr))