club fixes.
[wolnelektury.git] / src / club / forms.py
index 75213fc..675c18d 100644 (file)
@@ -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'