8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 19:33:11 +00:00

Etiquettes en francais sur les models

This commit is contained in:
chirac 2016-07-01 11:08:35 +02:00
parent 5326e328dd
commit e08adf5833

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']