8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-26 06:32:26 +00:00

Etiquettes en francais sur les models

This commit is contained in:
Gabriel Detraz 2016-07-01 11:08:35 +02:00
parent 5277510666
commit 374d173539

View file

@ -32,11 +32,23 @@ class School(models.Model):
return self.name return self.name
class UserForm(ModelForm): 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: class Meta:
model = User model = User
fields = '__all__' fields = '__all__'
class InfoForm(ModelForm): 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: class Meta:
model = User model = User
fields = ['name','surname','pseudo','email', 'school', 'promo'] fields = ['name','surname','pseudo','email', 'school', 'promo']
@ -46,7 +58,7 @@ class PasswordForm(ModelForm):
model = User model = User
fields = ['pwd_ssha','pwd_ntlm'] fields = ['pwd_ssha','pwd_ntlm']
class ArchiveForm(ModelForm): class StateForm(ModelForm):
class Meta: class Meta:
model = User model = User
fields = ['state'] fields = ['state']