Django Auth模型问题—AUTH_USER_MODEL未安装

时间:2020-12-31 19:17:52

Trying to debug this error with getting a Django project running

试图通过让Django项目运行来调试这个错误

ImproperlyConfigured: AUTH_USER_MODEL refers to model 'accounts.User' that has not been installed

Running

运行

python manage.py migrate

Must iterate i am in no way a python or django expert - I have simply inherited someone elses project that I am trying to get running for the team here.

必须迭代我决不是一个python或django专家——我只是继承了一个elses项目,我正试图为这里的团队运行。

I have followed steps to

我已经按照步骤去做了。

install postgres
required modules including south
creating database for postgres

Any help appreciated on how to debug this.

对于如何调试这个问题,有任何帮助。

settings/base.py contains

设置/基地。py包含

INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS

LOCAL_APPS = (
    'apps.core',
    'apps.accounts',
    'apps.project_tool',
    'apps.internal',
    'apps.external',
)

so apps.accounts exits - but it asks for AUTH_USER_MODEL = 'accounts.User' - should it be

所以应用程序。帐户退出—但它要求AUTH_USER_MODEL = '帐户。用户-应该是

AUTH_USER_MODEL = 'apps.accounts.User'?

2 个解决方案

#1


2  

I'd assume that the accounts app hasn't been added to your INSTALLED_APPS in settings.py.

我假设帐户应用程序没有被添加到settings.py中的INSTALLED_APPS中。

#2


0  

Are you running South 0.8.3?

你是往南跑0.8.3吗?

Ensure that you running South at least 0.8.4

确保你至少向南跑0.8.4

GitHub issue South Release Notes

GitHub发布了南方发行笔记

#1


2  

I'd assume that the accounts app hasn't been added to your INSTALLED_APPS in settings.py.

我假设帐户应用程序没有被添加到settings.py中的INSTALLED_APPS中。

#2


0  

Are you running South 0.8.3?

你是往南跑0.8.3吗?

Ensure that you running South at least 0.8.4

确保你至少向南跑0.8.4

GitHub issue South Release Notes

GitHub发布了南方发行笔记