fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix race in filters
[wolnelektury.git]
/
src
/
club
/
forms.py
diff --git
a/src/club/forms.py
b/src/club/forms.py
index
75213fc
..
675c18d
100644
(file)
--- a/
src/club/forms.py
+++ b/
src/club/forms.py
@@
-135,7
+135,11
@@
class DonationStep1Form(forms.ModelForm):
'monthly'
]
'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'
def clean(self):
state = {}
state['monthly'] = self.cleaned_data['switch'] == 'monthly'