Commit 5c0bca0e authored by chirac's avatar chirac

Doc strings

parent 9006a635
......@@ -207,6 +207,7 @@ class EditInfoForm(BaseInfoForm):
]
class InfoForm(EditInfoForm):
""" Utile pour forcer un déménagement quand il y a déjà un user en place"""
force = forms.BooleanField(label="Forcer le déménagement ?", initial=False, required=False)
def clean_force(self):
......@@ -215,15 +216,18 @@ class InfoForm(EditInfoForm):
return
class UserForm(InfoForm):
""" Model form general"""
class Meta(InfoForm.Meta):
fields = '__all__'
class PasswordForm(ModelForm):
""" Formulaire de changement brut de mot de passe. Ne pas utiliser sans traitement"""
class Meta:
model = User
fields = ['password', 'pwd_ntlm']
class ServiceUserForm(ModelForm):
""" Modification d'un service user"""
password = forms.CharField(label=u'Nouveau mot de passe', max_length=255, validators=[MinLengthValidator(8)], widget=forms.PasswordInput, required=False)
class Meta:
......@@ -235,6 +239,7 @@ class EditServiceUserForm(ServiceUserForm):
fields = ['access_group','comment']
class StateForm(ModelForm):
""" Changement de l'état d'un user"""
class Meta:
model = User
fields = ['state']
......
This diff is collapsed.
......@@ -716,6 +716,8 @@ class JSONResponse(HttpResponse):
@login_required
@permission_required('serveur')
def mailing(request):
""" Fonction de serialisation des addresses mail de tous les users
Pour generation de ml all users"""
mails = all_has_access().values('email').distinct()
seria = MailSerializer(mails, many=True)
return JSONResponse(seria.data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment