From b64b265b63c96324a837ee41457809764c4ba823 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Thu, 30 Jun 2016 03:46:31 +0200 Subject: [PATCH] Ajoute des models form --- users/models.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/users/models.py b/users/models.py index d5637fd9..b1bbfafa 100644 --- a/users/models.py +++ b/users/models.py @@ -29,7 +29,22 @@ class School(models.Model): class UserForm(ModelForm): class Meta: model = User - fields = ['name','surname','pseudo','email','school','promo','pwd_ssha','pwd_ntlm','state'] + fields = '__all__' + +class InfoForm(ModelForm): + class Meta: + model = User + fields = ['name','surname','pseudo','email'] + +class PasswordForm(ModelForm): + class Meta: + model = User + fields = ['pwd_ssha','pwd_ntlm'] + +class ArchiveForm(ModelForm): + class Meta: + model = User + fields = ['state'] class SchoolForm(ModelForm): class Meta: