8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-24 07:53:47 +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
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']