def user_can_authenticate(self, user):
        is_active = getattr(user, 'is_active', None)
        return is_active or is_active is None
Reject users with is_active=False. Custom user models that don't have
dataset/ETHPy150Open django/django/django/contrib/auth/backends.py/ModelBackend.user_can_authenticate