fixing birth date and registration bugs
This commit is contained in:
@@ -590,6 +590,7 @@ class RegistrationFormSex(RegistrationFormUniqueEmail):
|
|||||||
age = (timezone.now() - dob).days/365
|
age = (timezone.now() - dob).days/365
|
||||||
if age < 16:
|
if age < 16:
|
||||||
raise forms.ValidationError('Must be at least 16 years old to register')
|
raise forms.ValidationError('Must be at least 16 years old to register')
|
||||||
|
return self.cleaned_data['birthdate']
|
||||||
|
|
||||||
sex = forms.ChoiceField(required=True,
|
sex = forms.ChoiceField(required=True,
|
||||||
choices=sexcategories,
|
choices=sexcategories,
|
||||||
|
|||||||
@@ -1032,6 +1032,8 @@ def add_defaultfavorites(r):
|
|||||||
def rower_register_view(request):
|
def rower_register_view(request):
|
||||||
|
|
||||||
nextpage = request.GET.get('next','/rowers/list-workouts/')
|
nextpage = request.GET.get('next','/rowers/list-workouts/')
|
||||||
|
if nextpage == '':
|
||||||
|
nextpage = '/rowers/list-workouts/'
|
||||||
|
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
#form = RegistrationFormUniqueEmail(request.POST)
|
#form = RegistrationFormUniqueEmail(request.POST)
|
||||||
|
|||||||
Reference in New Issue
Block a user