From 209bb48981bdd4735a4832d9b5625a4c59ea917f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Sat, 7 May 2016 11:28:57 +0200 Subject: [PATCH] Use super() like in Python 2 --- camps/models.py | 2 +- tickets/views.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/camps/models.py b/camps/models.py index f6566225..3a76c02a 100644 --- a/camps/models.py +++ b/camps/models.py @@ -52,7 +52,7 @@ class Camp(CreatedUpdatedModel, UUIDModel): ) def save(self, **kwargs): - super().save(**kwargs) + super(Camp, self).save(**kwargs) self.create_days() diff --git a/tickets/views.py b/tickets/views.py index f8065af9..3d168266 100644 --- a/tickets/views.py +++ b/tickets/views.py @@ -13,7 +13,7 @@ class CampTicketSaleCheck(object): def dispatch(self, *args, **kwargs): current_camp = Camp.objects.current() if current_camp and current_camp.ticket_sale_open: - return super().dispatch(*args, **kwargs) + return super(CampTicketSaleCheck, self).dispatch(*args, **kwargs) raise Http404() @@ -21,7 +21,7 @@ class TicketIndexView(CampTicketSaleCheck, TemplateView): template_name = "tickets/index.html" def get_context_data(self, **kwargs): - context = super().get_context_data(**kwargs) + context = super(TicketIndexView, self).get_context_data(**kwargs) context['ticket_types'] = TicketType.objects.all() return context @@ -38,7 +38,7 @@ class BuyTicketView(CampTicketSaleCheck, CreateView): form_class = TicketForm def get_form_kwargs(self): - kwargs = super().get_form_kwargs() + kwargs = super(BuyTicketView, self).get_form_kwargs() ticket_type = self.request.GET.get('ticket_type', None) if ticket_type: kwargs['initial'] = {