Private
Public Access
1
0

fixing birth date and registration bugs

This commit is contained in:
Sander Roosendaal
2018-12-15 14:50:13 +01:00
parent b6a0724fb6
commit b54f6d6b7e
2 changed files with 3 additions and 0 deletions

View File

@@ -590,6 +590,7 @@ class RegistrationFormSex(RegistrationFormUniqueEmail):
age = (timezone.now() - dob).days/365
if age < 16:
raise forms.ValidationError('Must be at least 16 years old to register')
return self.cleaned_data['birthdate']
sex = forms.ChoiceField(required=True,
choices=sexcategories,

View File

@@ -1032,6 +1032,8 @@ def add_defaultfavorites(r):
def rower_register_view(request):
nextpage = request.GET.get('next','/rowers/list-workouts/')
if nextpage == '':
nextpage = '/rowers/list-workouts/'
if request.method == 'POST':
#form = RegistrationFormUniqueEmail(request.POST)