Django:已安装的应用程序命名冲突?

2024-05-29 11:53:31 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经在它自己的应用程序中创建了自定义用户身份验证,正如文档所建议的那样。它被命名为UserAuth。不过,我还有一个Users应用程序,它处理项目的各种用户角色。在

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',
    'AlmondKing.UserAuth',
    'allauth',
    'allauth.account',
    'allauth.socialaccount',
    'allauth.socialaccount.providers.facebook',
    'allauth.socialaccount.providers.twitter',
    'allauth.socialaccount.providers.google',
    'allauth.socialaccount.providers.linkedin',
    'formtools',
]

AUTH_USER_MODEL = 'UserAuth.AKUser'

这很好,但是当我将AlmondKing.Users添加到INSTALLED_APPS时,它会中断:

^{pr2}$

当我尝试使用runserver时,上面的内容会被打印出来。它指的是Users应用程序中的三个模型。在

我打破了什么规则?在


Tags: appsinstalleddjango用户文档身份验证应用程序contrib

热门问题