Create user and profile with all field needed

This commit is contained in:
Pierre-antoine Comby 2020-02-02 15:42:39 +01:00
parent c4a5970ca3
commit 37a5b578a4
3 changed files with 23 additions and 14 deletions

View file

@ -16,9 +16,15 @@ from crispy_forms.bootstrap import InlineField, FormActions, StrictButton, Div,
from crispy_forms.layout import Layout
class SignUpForm(UserCreationForm):
class Meta:
model = User
fields = ['first_name','last_name','username','email']
class ProfileForm(forms.ModelForm):
"""
Forms pour la création d'un profile utilisateur.
A form for the extras field provided by the :model:`member.Profile` model.
"""
class Meta:
model = Profile