def activate(self, *args, **kwargs):
    username = self.validate_key(kwargs.get('activation_key'))
    if (username is not None):
        user = self.get_user(username)
        if (user is not None):
            user.is_active = True
            user.save()
            return user
    return False
def activate(self, *args, **kwargs):
    username = self.validate_key(kwargs.get('activation_key'))
    if (username is not None):
        user = self.get_user(username)
        if (user is not None):
            user.is_active = True
            user.save()
            return user
    return False