pretix-digital-items/pretix_digital_items/views.py

24 lines
805 B
Python
Raw Permalink Normal View History

2020-11-19 09:40:03 +01:00
from django.urls import reverse
from pretix.control.views.event import EventSettingsFormView, EventSettingsViewMixin
from pretix.base.models.event import Event
from .forms import PretixDigitalItemsSettingsForm
from pretix.presale.style import regenerate_css
from django.contrib import messages
class SettingsView(EventSettingsViewMixin, EventSettingsFormView):
model = Event
permission = "can_change_settings"
form_class = PretixDigitalItemsSettingsForm
template_name = "pretix_digital_items/settings.html"
def get_success_url(self, **kwargs):
return reverse(
"plugins:pretix_digital_items:settings",
kwargs={
"organizer": self.request.event.organizer.slug,
"event": self.request.event.slug,
},
)