8👍
Default ModelManager
doesn’t have the create_user
method. Set the proper manager to your User
class. Also you need to inherit from AbstractBaseUser class instead of models.Model
:
from django.contrib.auth.models import AbstractBaseUser, UserManager
class User(AbstractBaseUser):
...
objects = UserManager()
Source:stackexchange.com