-# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
#
from django.conf import settings
from django.contrib.auth.decorators import login_required, permission_required
queryset = models.Schedule.objects.filter(payed_at=None)
form_class = forms.DonationStep1Form
slug_field = slug_url_kwarg = 'key'
- template_name = 'club/2022/donation_step1.html'
+ template_name = 'club/donation_step1.html'
step = 1
def get_context_data(self, **kwargs):
queryset = models.Schedule.objects.filter(payed_at=None)
form_class = forms.DonationStep2Form
slug_field = slug_url_kwarg = 'key'
- template_name = 'club/2022/donation_step2.html'
+ template_name = 'club/donation_step2.html'
step = 2
def get_context_data(self, **kwargs):
class JoinView(CreateView):
form_class = forms.DonationStep1Form
- template_name = 'club/2022/donation_step1.html'
+ template_name = 'club/donation_step1.html'
@property
def club(self):
def get_form_kwargs(self):
kwargs = super().get_form_kwargs()
- #kwargs['referer'] = self.request.META.get('HTTP_REFERER', '')
+ kwargs['referer'] = self.request.META.get('HTTP_REFERER', '')
return kwargs
def form_valid(self, form):
def get_template_names(self):
if not self.object.payed_at:
- return 'club/2022/donation_step3.html'
+ return 'club/donation_step3.html'
return 'club/schedule.html'
def get_context_data(self, *args, **kwargs):
class ScheduleThanksView(DetailView):
model = models.Schedule
- template_name = 'club/2022/donation_step4.html'
+ template_name = 'club/donation_step4.html'
slug_field = slug_url_kwarg = 'key'
step = 4