From 75bcf3aef81d606c677a5a2b6e6a564a3881bc7c Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 21 Feb 2018 13:26:29 +0100 Subject: [PATCH] bug fix birth date --- rowers/forms.py | 4 +++- rowers/templates/registration_form.html | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rowers/forms.py b/rowers/forms.py index c5ffa552..9699aedc 100644 --- a/rowers/forms.py +++ b/rowers/forms.py @@ -418,9 +418,11 @@ class RegistrationFormSex(RegistrationFormUniqueEmail): ('hwt','heavy-weight'), ('lwt','light-weight'), ) + + thisyear = timezone.now().year birthdate = forms.DateTimeField( - widget=SelectDateWidget(), + widget=SelectDateWidget(years=range(1900,thisyear)), initial = datetime.date(year=1970, month=4, day=15)) diff --git a/rowers/templates/registration_form.html b/rowers/templates/registration_form.html index adc33553..82f51fce 100644 --- a/rowers/templates/registration_form.html +++ b/rowers/templates/registration_form.html @@ -1,4 +1,6 @@ - {% extends "base.html" %} +{% extends "base.html" %} +{% load staticfiles %} +{% load rowerfilters %} {% block title %}Contact Us{% endblock title %} {% block meta %}