[Answered ]-Syntax confusion over posting to database

1👍

You must be using django’s default ModelManager, which doesn’t have the create_user method. You need to inherit from AbstractBaseUser class instead of models.Model in your User model and add objects = UserManager() to your model, like below:

from django.contrib.auth.models import AbstractBaseUser, UserManager

class User(AbstractBaseUser):
    ...
    objects =  UserManager()

Leave a comment