def subscribe_to_mailchimp(self): if self.course.mailchimp_list_id is not None: subscribe_to_mailchimp.delay( list_id=self.course.mailchimp_list_id, user_id=self.user.pk, tags=[self.course.slug, f'{self.course.slug}-purchased'], )
def after_creation(self): if self.do_subscribe: if self.resulting_user.email and len(self.resulting_user.email): subscribe_to_mailchimp.delay(self.resulting_user.pk)