Private
Public Access
1
0

simple upgrade/billing address form

This commit is contained in:
Sander Roosendaal
2018-12-19 10:33:43 +01:00
parent 0b79b0de98
commit fa61957be7
8 changed files with 126 additions and 7 deletions

View File

@@ -571,14 +571,14 @@ class PaidPlan(models.Model):
clubsize = models.IntegerField(default=0)
def __unicode__(self):
return '{name} - {shortname} at {price} EURO ({paymenttype} payment) / {paymentprocessor}'.format(
return '{name} - {shortname} at {price} EURO ({paymenttype} payment)'.format(
name = self.name,
shortname = self.shortname,
price = self.price,
paymenttype = self.paymenttype,
paymentprocessor = self.paymentprocessor,
)
# Extension of User with rowing specific data
class Rower(models.Model):
@@ -3002,6 +3002,20 @@ class RowerImportExportForm(ModelForm):
'trainingpeaks_auto_export',
]
# Form to collect rower's Billing Info
class RowerBillingAddressForm(ModelForm):
class Meta:
model = Rower
fields = [
'street_address',
'city',
'postal_code',
'country'
]
def __init__(self, *args, **kwargs):
super(RowerBillingAddressForm, self).__init__(*args, **kwargs)
self.fields['country'].required = True
# Form to set rower's Email and Weight category