manage.py@OMS > makemigrations
CommandError: System check identified some issues:
ERRORS:
index.Message.msg_author: (fields.E301) Field defines a relation with the model 'auth.User', which has been swapped out.
HINT: Update the relation to point at 'settings.AUTH_USER_MODEL'.
models.py
from django.db import models
from django.contrib.auth.models import AbstractUser
from index.models import FunChildList
class MyUser(AbstractUser):
    my_permissions = models.ManyToManyField(FunChildList, null=True, blank=True)
settings.py设置:
AUTH_USER_MODEL = "userCenter.MyUser"
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你的问题解决了吗?想知道解决方案?