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

@@ -3,11 +3,11 @@ from itertools import chain
from django import forms
from django.core.exceptions import ValidationError
from django.db.models import Count, Prefetch
from django.utils.encoding import force_text
from django.utils.encoding import force_str
from django.utils.formats import number_format
from django.utils.html import escape
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from pretix.base.forms.questions import (
BaseInvoiceAddressForm, BaseQuestionsForm,
@@ -105,7 +105,7 @@ class AddOnRadioSelect(forms.RadioSelect):
groups.append((group_name, subgroup, index))
selected = (
force_text(option_value) in value and
force_str(option_value) in value and
(has_selected is False or self.allow_multiple_selected)
)
if selected is True and has_selected is False:
@@ -121,9 +121,9 @@ class AddOnRadioSelect(forms.RadioSelect):
class AddOnVariationField(forms.ChoiceField):
def valid_value(self, value):
text_value = force_text(value)
text_value = force_str(value)
for k, v, d in self.choices:
if value == k or text_value == force_text(k):
if value == k or text_value == force_str(k):
return True
return False

View File

@@ -1,5 +1,5 @@
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
class ResendLinkForm(forms.Form):