'monthly': forms.HiddenInput,
}
+ def __init__(self, referer=None, **kwargs):
+ self.referer = referer
+ super().__init__(**kwargs)
+
def clean_amount(self):
value = self.cleaned_data['amount']
club = models.Club.objects.first()
def save(self, *args, **kwargs):
NewsletterForm.save(self, *args, **kwargs)
+ self.instance.source = self.referer or ''
return super().save(*args, **kwargs)