这是我的设置。
########## 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应用程序:
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
我没有进行任何代码更改,现在我无法创建或更新实例。我将在服务器中收到此错误消息:
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应用程序中有一些更改会出现此错误。但我无法找到我必须使用的某些应用程序版本。我已经有过这种问题,但设法解决了这些问题。现在,我找不到原因......有没有其他人解决这个问题?
答案 0 :(得分:0)
可能是由于缺少django确保已安装所有要求。如果您使用的是VirtualEnv,请确保在使用manage.py
启动服务器之前激活