Example #1
0
 def save(self, commit=True, *args, **kwargs):
     with atomic():
         user = super(PersonRegistrationForm, self).save(*args, **kwargs)
         contact = get_person_contact(user)
         contact.add_to_shop(self.request.shop)
         person_registration_save.send(sender=type(self), request=self.request, user=user, contact=contact)
     return user
Example #2
0
 def save(self, *args, **kwargs):
     user = super(PersonRegistrationForm, self).save(*args, **kwargs)
     contact = get_person_contact(user).shops.add(self.request.shop)
     person_registration_save.send(sender=type(self),
                                   request=self.request,
                                   user=user,
                                   contact=contact)
     return user
Example #3
0
 def save(self, *args, **kwargs):
     user = super(PersonRegistrationForm, self).save(*args, **kwargs)
     contact = get_person_contact(user)
     contact.add_to_shop(self.request.shop)
     person_registration_save.send(sender=type(self), request=self.request, user=user, contact=contact)
     return user