Compare commits

...

2 Commits

Author SHA1 Message Date
Pierre-antoine Comby 963ba05d01 🎨 set default birthday to 2001-01-01 2020-08-08 16:20:59 +02:00
Pierre-antoine Comby 18eaf4477e 🐛 timezone.now is a DateTime, not a Date 2020-08-08 15:30:33 +02:00
3 changed files with 6 additions and 4 deletions

View File

@ -39,7 +39,7 @@ class ProfileForm(forms.ModelForm):
"""
report_frequency = forms.IntegerField(required=False, initial=0, label=_("Report frequency"))
last_report = forms.DateField(required=False, disabled=True, label=_("Last report date"))
last_report = forms.DateTimeField(required=False, disabled=True, label=_("Last report date"))
def save(self, commit=True):
if not self.instance.section or (("department" in self.changed_data
@ -50,7 +50,7 @@ class ProfileForm(forms.ModelForm):
class Meta:
model = Profile
fields = '__all__'
exclude = ('user', 'email_confirmed', 'registration_valid', )
exclude = ('user', )
class ClubForm(forms.ModelForm):

View File

@ -97,7 +97,7 @@ class Profile(models.Model):
default=0,
)
last_report = models.DateField(
last_report = models.DateTimeField(
verbose_name=_("last report date"),
default=timezone.now,
)

View File

@ -39,7 +39,9 @@ class WEIRegistrationForm(forms.ModelForm):
'placeholder': 'Nom ...',
},
),
"birth_date": DatePickerInput(),
"birth_date": DatePickerInput(options={'defaultDate':'2000-01-01',
'minDate':'1900-01-01',
'maxDate': '2100-01-01'}),
}