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
def user(self): if self._user is None: self._user = UserFactory.create_user( self.get_email(), constants.USER_PASSWORD) return self._user