diff --git a/core/static/js/main.js b/core/static/js/main.js index 425347b..5900cfb 100644 --- a/core/static/js/main.js +++ b/core/static/js/main.js @@ -1 +1,3 @@ -$('.date-picker').datepicker({ format: 'dd/mm/yy' }); \ No newline at end of file +$('.date-picker').datepicker({ + format: 'mm/dd/yyyy', +}); \ No newline at end of file diff --git a/users/forms.py b/users/forms.py index 0d59813..d30f102 100644 --- a/users/forms.py +++ b/users/forms.py @@ -39,7 +39,7 @@ class UserForm(RegisterUserForm): class Meta: model = User - fields = ['username', 'name', 'email', 'birth_date', 'city', 'state', 'gender', 'type_profile', 'cpf', 'phone', 'image', 'is_staff', 'is_active'] + fields = ['username', 'name', 'email', 'birth_date', 'city', 'state', 'gender', 'type_profile', 'cpf', 'phone', 'image', 'titration', 'year_titration', 'institution', 'curriculum', 'is_staff', 'is_active'] class UpdateUserForm(forms.ModelForm): @@ -59,6 +59,7 @@ class UpdateUserForm(forms.ModelForm): def clean_birth_date(self): birth_date = self.cleaned_data['birth_date'] if birth_date >= date.today(): + print('===============' + date.today() + '================') raise forms.ValidationError(_('Please enter a valid date')) return birth_date diff --git a/users/templates/users/create.html b/users/templates/users/create.html index eeda35a..1237edd 100644 --- a/users/templates/users/create.html +++ b/users/templates/users/create.html @@ -55,6 +55,22 @@ + + {% elif field.auto_id == 'id_curriculum' %} + {% if field.field.required %} + + {% else %} + + {% endif %} + {% render_field field class='form-control' %} +