Exemplo n.º 1
0
 def clean_motdepasse(self):
     user = User()
     if 'prenom' in self.cleaned_data:
         user.first_name = self.cleaned_data['prenom']
     if 'nom' in self.cleaned_data:
         user.last_name = self.cleaned_data['nom']
     data = self.cleaned_data['motdepasse']
     validate_password(data, user)
     return data
Exemplo n.º 2
0
 def clean_password(self):
     user = User()
     if 'first_name' in self.cleaned_data:
         user.first_name = self.cleaned_data['first_name']
     if 'last_name' in self.cleaned_data:
         user.last_name = self.cleaned_data['last_name']
     data = self.cleaned_data['password']
     validate_password(data, user)
     return data