0

Is there a setting in django-registration to disable the activation? Preferably, the e-mail would still be send with something like: Thanks for your registration.

  1. Is it possible to deactivate the required account activation and how?
  2. Is it still possible to send the activation e-mail but without the verification requirements?
Roel Veldhuizen
  • 4,613
  • 8
  • 44
  • 78

2 Answers2

0

Yes, you can use the simple backend.

Thomas Orozco
  • 53,284
  • 11
  • 113
  • 116
0

I know it's an old question, but in case someone was still looking for a solution, here is one option based on the specific 'user_activated' signal provided by django-registration.

As required by the original question, the activation is revoked silently, and the user isn't aware of this.

from django.dispatch import receiver
from registration.signals import user_activated


def remove_user_activation(user):
    """
    Replace with specific app logic
    """
    return True


@receiver(user_activated)
def on_user_activated(sender, **kwargs):
    """
    Revoke activation to robot users
    """

    user = kwargs['user']

    if remove_user_activation(user):
        if user.is_active:
            user.is_active = False
            user.save()
Mario Orlandi
  • 5,629
  • 26
  • 29