1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-04 19:04:03 +02:00

Personal page

This commit is contained in:
Yohann D'ANELLO
2020-09-24 18:39:55 +02:00
parent cd53d34443
commit 413525c6d2
10 changed files with 313 additions and 62 deletions

View File

@ -26,6 +26,18 @@ class SignupForm(UserCreationForm):
fields = ('first_name', 'last_name', 'email', 'password1', 'password2', 'role',)
class UserForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields["first_name"].required = True
self.fields["last_name"].required = True
self.fields["email"].required = True
class Meta:
model = User
fields = ('first_name', 'last_name', 'email',)
class StudentRegistrationForm(forms.ModelForm):
class Meta:
model = StudentRegistration