Prepare for DeleteView change in Django 4.0

This commit is contained in:
Raphael Michel
2023-01-24 14:16:01 +01:00
parent 50596b7543
commit 433262f6fc
14 changed files with 76 additions and 37 deletions

View File

@@ -52,9 +52,7 @@ from django.utils.functional import cached_property
from django.utils.timezone import make_aware
from django.utils.translation import gettext_lazy as _, pgettext_lazy
from django.views import View
from django.views.generic import (
CreateView, DeleteView, FormView, ListView, UpdateView,
)
from django.views.generic import CreateView, FormView, ListView, UpdateView
from pretix.base.models import CartPosition, LogEntry
from pretix.base.models.checkin import CheckinList
@@ -80,6 +78,7 @@ from pretix.control.signals import subevent_forms
from pretix.control.views import PaginationMixin
from pretix.control.views.event import MetaDataEditorMixin
from pretix.helpers import GroupConcat
from pretix.helpers.compat import CompatDeleteView
from pretix.helpers.models import modelcopy
@@ -148,7 +147,7 @@ class SubEventList(EventPermissionRequiredMixin, PaginationMixin, SubEventQueryM
return ctx
class SubEventDelete(EventPermissionRequiredMixin, DeleteView):
class SubEventDelete(EventPermissionRequiredMixin, CompatDeleteView):
model = SubEvent
template_name = 'pretixcontrol/subevents/delete.html'
permission = 'can_change_settings'