Django rest framework make migratoins error for AUTH_USER_MODEL

I'm trying to create two users who can register and modify the app this is my models.py for accounts app

class StoreUserManager(BaseUserManager):
def create_user(self, email, name, phone, password, password2, store_name, store_phone, store_address, store_location, store_description, store_image):
    if not email:
        raise ValueError('Users must have an email address')
    if not name:
        raise ValueError('Users must have a name')
    if not phone:
        raise ValueError('Users must have a phone number')
    if not password:
        raise ValueError('Users must have a password')
    if not password2:
        raise ValueError('Users must have a password2')
    if not store_name:
        raise ValueError('Users must have a store_name')
    if not store_phone:
        raise ValueError('Users must have a store_phone')
    if not store_address:
        raise ValueError('Users must have a store_address')
    if not store_location:
        raise ValueError('Users must have a store_location')
    if not store_description:
        raise ValueError('Users must have a store_description')
    if not store_image:
        raise ValueError('Users must have a store_image')

    user = self.model(
        email=self.normalize_email(email),
        name=name,
        phone=phone,
        password=password,
        password2=password2,
        store_name=store_name,
        store_phone=store_phone,
        store_address=store_address,   
        store_location=store_location,
        store_description=store_description,
        store_image=store_image,
    )

class StoreUser(AbstractUser): pass

#add manger to the model
objects = StoreUserManager()

and this is my setting.py

I get this error when i try to make migrations

HINT: Add or change a related_name argument to the definition for 'accounts.StoreUser.user_permissions' or 'accounts.CustomerUser.user_permissions'.

Back to Top