Example #1
0
def add_user_to_mailchimp(sender, instance, created, **kwargs):
    if instance.on_mailing_list:
        subscribe_user_to_mailer(instance)
Example #2
0
 def test_subscribe_user_to_mailer(self, _mocked_post):
     _mocked_post.return_value = Exception()
     _mocked_post.side_effect = Exception()
     out = subscribe_user_to_mailer(self.profile)
     self.assertFalse(out)
Example #3
0
def add_subscriber(modeladmin, request, queryset):
    for prof in queryset:
        subscribe_user_to_mailer(prof)
Example #4
0
def add_user_to_mailchimp(sender, instance, created, **kwargs):
    subscribe_user_to_mailer(instance)