Пример #1
0
 def save(self, commit=True):
     data = self.cleaned_data
     self.instance = UserFactory.create_user(data['email'],
                                             data['password'])
     UserRegistration.objects.create(user=self.instance,
                                     is_employer=data['is_employer'])
     return self.instance
Пример #2
0
 def user(self):
     if self._user is None:
         self._user = UserFactory.create_user(
             self.get_email(), constants.USER_PASSWORD)
     return self._user
Пример #3
0
 def save(self, commit=True):
     data = self.cleaned_data
     self.instance = UserFactory.create_user(data['email'], data['password'])
     UserRegistration.objects.create(user=self.instance,
         is_employer=data['is_employer'])
     return self.instance