def user_post_save(sender, instance, created, **kwargs): """Create a user profile when a new user account is created""" if created: for subscriber in get_subscriber_model().objects.filter( customer__isnull=True): Customer.get_or_create(subscriber=subscriber) print("Created subscriber for {0}".format(subscriber.email))
def test_with_org_static(self): org_model = get_subscriber_model() self.assertTrue(isinstance(org_model, ModelBase))
def test_with_user(self): user_model = get_subscriber_model() self.assertTrue(isinstance(user_model, ModelBase))