From 374d17353966f98c459d23ce4240fd525b674f29 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Fri, 1 Jul 2016 11:08:35 +0200 Subject: [PATCH] Etiquettes en francais sur les models --- users/models.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/users/models.py b/users/models.py index 9ce74b04..c7f52ed3 100644 --- a/users/models.py +++ b/users/models.py @@ -32,11 +32,23 @@ class School(models.Model): return self.name class UserForm(ModelForm): + def __init__(self, *args, **kwargs): + super(InfoForm, self).__init__(*args, **kwargs) + self.fields['name'].label = 'Nom' + self.fields['surname'].label = 'Prenom' + self.fields['school'].label = 'Etablissement' + class Meta: model = User fields = '__all__' class InfoForm(ModelForm): + def __init__(self, *args, **kwargs): + super(InfoForm, self).__init__(*args, **kwargs) + self.fields['name'].label = 'Nom' + self.fields['surname'].label = 'Prenom' + self.fields['school'].label = 'Etablissement' + class Meta: model = User fields = ['name','surname','pseudo','email', 'school', 'promo'] @@ -46,7 +58,7 @@ class PasswordForm(ModelForm): model = User fields = ['pwd_ssha','pwd_ntlm'] -class ArchiveForm(ModelForm): +class StateForm(ModelForm): class Meta: model = User fields = ['state']