[Solved] AttributeError: Manager isn‘t available; ‘auth.User‘ has been swapped for ‘

AttributeError: Manager isn't available; ' auth.User' has been swapped for 'account.UserInfo'

This is because I have extended Django’s user authentication model

#setting.py
AUTH_USER_MODEL = 'account.UserInfo'

Official documents

from django.contrib.auth.models import User
from django.contrib.auth import get_user_model

User = get_user_model()

Or use the user info model directly

""" get_user_model"""
def get_user_model():
    """
    Return the User model that is active in this project.
    """
    try:
        return django_apps.get_model(settings.AUTH_USER_MODEL, require_ready=False)
    except ValueError:
        raise ImproperlyConfigured("AUTH_USER_MODEL must be of the form 'app_label.model_name'")
    except LookupError:
        raise ImproperlyConfigured(
            "AUTH_USER_MODEL refers to model '%s' that has not been installed" % settings.AUTH_USER_MODEL
        )

Read More: