This is the Custom user model
I also declared in settings
AUTH_USER_MODEL="recipes.CustomUser"
still I face this error ValueError:The field admin.LogEntry.user was declared with a lazy reference to 'recipes.customuser',but app'recipes'doesn't provide model 'customuser'`
from django.db import models
from django.http import HttpResponse
from django.contrib.auth.models import AbstractUser, Permission
from django.conf import settings
from django.contrib.auth import get_user_model
import secrets
class CustomUser(AbstractUser):
email=models.EmailField(unique=True)
USERNAME_FIELD="email"
REQUIRED_FIELDS=["username"]
def __str__(self) -> str:
return self.email
AUTH_USER_MODEL="recipes.CustomUserdo you have your CustomUser set up in recipes app?