X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/08e687e53ba84afd39646185142e59c6bfe77783..2aff714cb52d85d39824728d70b3272bb4fd5064:/src/club/forms.py?ds=inline diff --git a/src/club/forms.py b/src/club/forms.py index 75213fc44..675c18dc5 100644 --- a/src/club/forms.py +++ b/src/club/forms.py @@ -135,7 +135,11 @@ class DonationStep1Form(forms.ModelForm): 'monthly' ] - + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + club = models.Club.objects.first() + self.fields['custom_amount'].widget.attrs['min'] = club.min_amount + def clean(self): state = {} state['monthly'] = self.cleaned_data['switch'] == 'monthly'