order_model = models.PayUOrder
-class MembershipView(UpdateView):
- fields = ['name']
-
- def get_success_url(self):
- # TODO: get only current schedule if multiple.
- return self.object.schedule_set.first().get_absolute_url()
-
- def get_object(self):
- return self.request.user.membership
-
-
class ScheduleThanksView(DetailView):
model = models.Schedule
slug_field = slug_url_kwarg = 'key'
emails = request.POST.get('emails').strip().split('\n')
rows = ['email;członek;nazwa użytkownika;aktywny;co najmniej do']
for email in emails:
+ email = email.strip()
row = [email]
schedules = models.Schedule.objects.filter(email=email).exclude(payed_at=None)
if schedules.exists():