I have created a custom user as follows:
from django.db import models
from django.contrib.auth.models import AbstractUser
class CustomUser(AbstractUser):
email = models.EmailField(unique=True)
USERNAME_FIELD="email"
REQUIRED_FIELDS=["username"]
def __str__(self) -> str:
return self.email
I have defined the model in my settings.py file as follows
AUTH_USER_MODEL = “users.CustomUser”
when I run the migrate command I get the above error
I have tried running python manage.py migrate users –fake but the error still persists