forked from CGM_Public/pretix_original
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:
@@ -1,6 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.functional import cached_property
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from pretix import __version__ as version
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ from django import forms
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.http import HttpRequest
|
||||
from django.template.loader import get_template
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from i18nfield.fields import I18nFormField, I18nTextarea
|
||||
from i18nfield.forms import I18nTextInput
|
||||
from i18nfield.strings import LazyI18nString
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from django.dispatch import receiver
|
||||
from django.template.loader import get_template
|
||||
from django.urls import resolve, reverse
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from pretix.base.signals import register_payment_providers
|
||||
from pretix.control.signals import html_head, nav_event, nav_organizer
|
||||
|
||||
@@ -6,7 +6,7 @@ from celery.exceptions import MaxRetriesExceededError
|
||||
from django.conf import settings
|
||||
from django.db import transaction
|
||||
from django.db.models import Q
|
||||
from django.utils.translation import ugettext, ugettext_noop
|
||||
from django.utils.translation import gettext, gettext_noop
|
||||
from django_scopes import scope, scopes_disabled
|
||||
|
||||
from pretix.base.email import get_email_context
|
||||
@@ -28,7 +28,7 @@ def notify_incomplete_payment(o: Order):
|
||||
with language(o.locale):
|
||||
email_template = o.event.settings.mail_text_order_expire_warning
|
||||
email_context = get_email_context(event=o.event, order=o)
|
||||
email_subject = ugettext('Your order received an incomplete payment: %(code)s') % {'code': o.code}
|
||||
email_subject = gettext('Your order received an incomplete payment: %(code)s') % {'code': o.code}
|
||||
|
||||
try:
|
||||
o.send_mail(
|
||||
@@ -96,7 +96,7 @@ def _handle_transaction(trans: BankTransaction, code: str, event: Event=None, or
|
||||
trans.state = BankTransaction.STATE_DUPLICATE
|
||||
elif trans.order.status == Order.STATUS_CANCELED:
|
||||
trans.state = BankTransaction.STATE_ERROR
|
||||
trans.message = ugettext_noop('The order has already been canceled.')
|
||||
trans.message = gettext_noop('The order has already been canceled.')
|
||||
else:
|
||||
try:
|
||||
p, created = trans.order.payments.get_or_create(
|
||||
|
||||
@@ -12,7 +12,7 @@ from django.shortcuts import get_object_or_404, redirect, render
|
||||
from django.urls import reverse
|
||||
from django.utils.functional import cached_property
|
||||
from django.utils.timezone import now
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import DetailView, ListView, View
|
||||
|
||||
from pretix.base.models import Order, OrderPayment, OrderRefund, Quota
|
||||
|
||||
Reference in New Issue
Block a user