Django AUTH_USER_MODEL not registering custom User class
<p>I've got this setup in my models</p>

<p>from django.contrib.auth.models import AbstractBaseUser, BaseUserManager
from django.db import models</p>

<pre><code>class AccountManager(BaseUserManager):
    def create_user(self, email, password=None, **kwargs):
        . . .
    def create_superuser(self, email, password, **kwargs):
        . . .

class Account(AbstractBaseUser):
    . . .
</code></pre>

<p>In settings, I have done this:</p>

<pre><code>AUTH_USER_MODEL = 'authentication.Account'
</code></pre>

<p>but I continue to get this error:</p>

<pre><code>AttributeError: Manager isn't available; 'auth.User' has been swapped for 'authentication.Account'
</code></pre>

<p>Please I would like to know why and how to fix this</p>

<p>Explicitly specify the manager inside your custom user model:</p>

<pre><code>class Account(AbstractBaseUser):
    objects = AccountManager()
    ....
</code></pre>

python django