AUTH_USER_MODEL指的是尚未安装的模型'%s'.%设置.AUTH_USER_MODEL [英] AUTH_USER_MODEL refers to model '%s' that has not been installed" % settings.AUTH_USER_MODEL

查看:57
本文介绍了AUTH_USER_MODEL指的是尚未安装的模型'%s'.%设置.AUTH_USER_MODEL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的设置.

    ########## APP CONFIGURATION
DJANGO_APPS = (
    # Default Django apps:
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',

    # Useful template tags:
    # 'django.contrib.humanize',

    # Admin panel and documentation:
    'django.contrib.admin',
    # 'django.contrib.admindocs',
)

THIRD_PARTY_APPS = (
    'south',
    'colorful',
    #'grappelli',
    'django_extensions',
    #'rest_framework',
    #'sorl.thumbnail',
    'guardian',
    'sslserver',
    'djangosecure',
    'django_nose',
)

# Apps specific for this project go here.
LOCAL_APPS = (
    'main',
    'executor',
    'workshop',
    'management',
)

这是我加载的python应用程序:

And here is my loaded python apps:

    Django < 1.7
South === 1.0
django-colorful
django-extensions == 1.5.2
django-mptt == 0.7.4
loremipsum < 1.0.4
django_debug_toolbar
werkzeug == 0.11.4
Pillow == 3.1.1
MySQL-python
xlwt
xlrd
django-guardian == 1.3.2
lxml
fabric
django-fab-deploy
django-secure === 1.0.1
django-sslserver === 0.15
python-ldap === 2.4.19
django_auth_ldap
html2text
htmlentities
openpyxl
raven
colorful
ipython == 4.1.1
django-nose
newrelic

我没有做任何代码更改,现在无法创建或更新实例.我将在服务器中收到此错误消息:

I have done none code changes and now I can't create or update instances. I will get this error message in server:

    File "/srv/www/lohja/targetor/env/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 129, in get_user_model
[targetor_upgrade@targetorpro.fi] out:
raise ImproperlyConfigured("AUTH_USER_MODEL refers to model '%s' that has not been installed" % settings.AUTH_USER_MODEL)
[targetor_upgrade@targetorpro.fi] out:
django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'executor.ExecutorUser' that has not been installed
[targetor_upgrade@targetorpro.fi] out:
Fatal error: run() received nonzero return code 1 while executing!
Requested: /srv/www/lohja/targetor/env/bin/python /srv/www/lohja/targetor/manage.py migrate --fake --no-initial-data guardian --settings=settings.local_setti$
Executed: /bin/bash -l -c "cd /srv/www/lohja/targetor/env/bin/ && . /srv/www/lohja/targetor/env/bin/activate && /srv/www/lohja/targetor/env/bin/python /srv/w$
Aborting.

我猜想python应用程序中会有一些更改会导致此错误.但是我找不到必须使用的某些应用程序的版本.我已经遇到过此类问题,但设法解决了这些问题.现在,我找不到原因了……还有其他人可以解决此问题吗?

I guess there are some changes in python apps which will do this error. But I can't find which version of certain apps I have to use. I had have already this kind of problem but managed to solve those. Now, I can't find the reason... Does anyone else fix this issue?

推荐答案

可能是由于缺少django所致,请确保已安装所有要求.如果您使用的是VirtualEnv,请确保在使用manage.py

Could be due to missing django make sure all the requirement have been install. If you are using VirtualEnv make sure you activate prior to starting your server using manage.py

这篇关于AUTH_USER_MODEL指的是尚未安装的模型'%s'.%设置.AUTH_USER_MODEL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆