示例#1
0
def user_post_save(sender, instance, signal, *args, **kwargs):
    if not instance.is_verified:
        # send_mail('Verify your QuickPublisher account',
        #           'Follow this link to verify your account: '
        #           'http://*****:*****@quickpublisher.dev', [instance.email], fail_silently=False)

        # .delay means we're sending the task off to Celery and we don't wait for the result. If we used
        # send_verification_email(instance.pk) instead, we would still be sending it to Celery, but would be waiting
        #  for the task to finish.
        send_verification_email.delay(instance.pk)
示例#2
0
def user_post_save(sender, instance, signal, *args, **kwargs):
    if not instance.is_verified:
        # Send verification email
        send_verification_email.delay(instance.pk)