簡體   English   中英

AUTH_USER_MODEL指的是尚未安裝的模型'%s'“%設置。AUTH_USER_MODEL

[英]AUTH_USER_MODEL refers to model '%s' that has not been installed" % settings.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應用程序:

    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應用程序中有一些更改將執行此錯誤。 但是我找不到必須使用的某些應用程序的版本。 我已經遇到過此類問題,但設法解決了這些問題。 現在,我找不到原因了,其他人可以解決此問題嗎?

可能是由於缺少Django所致,請確保已安裝所有要求。 如果您使用的是VirtualEnv,請確保在使用manage.py啟動服務器之前先進行激活

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM