我已经尝试了最近几个小时来追踪错误的来源

AttributeError: 'Options' object has no attribute 'model_name'

我在尝试运行syncdb或迁移时得到它。

我安装的应用程序包括:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.comments',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.formtools',
'django.contrib.sitemaps',
'django.contrib.humanize',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
# Uncomment the next line to enable the admin:
'django.contrib.admin',

'customer',
'monitor',
'accounts',
'payments',

'cms',
'mptt',
'menus',
'south',
'sekizai',
'reversion',

'cms.plugins.text',
'cms.plugins.picture',
'cms.plugins.link',
'cms.plugins.file',
'cms.plugins.snippet',
'cms.plugins.googlemap',
'cms.plugins.video',

'zinnia',
'tagging',
'cmsplugin_zinnia',

'registration',
'django_filters',
'rest_framework',
'django_countries',
'smartagent',
'captcha',
'django.contrib.markup',
'knowledge',

'djcelery',
'djcelery_email',

'paypal.standard.ipn',
'paypal.standard.pdt',

'raven.contrib.django.raven_compat',
'django_statsd',

)

和需求文件具有:
#Requirements for the application
Django>=1.5
Fabric>=1.4.1
South>=0.7.4
psycopg2>=2.4.5
gunicorn>=0.14.1
#newrelic==1.2.0.246
django-celery>=3.0.21
requests
numpy>=1.7.1
raven>=4.0.3
django-statsd-mozilla>=0.3.9


django-mptt>=0.6.0
django-cache-machine==0.6
cssmin==0.1.4
django-cms>=2.4.3
django-blog-zinnia>=0.12.3
cmsplugin_zinnia>=0.4.0

django-reversion<1.8
pil
django-registration>=1.0
djangorestframework
markdown
django-filter
django-countries
django-download-stats>=0.2
django-smartagent>=0.1.1
django-recaptcha>=0.0.6
django-celery-email>=1.0.4
django-knowledge
xlwt>=0.7.5
#django-paypal>=0.1.2

有没有一种方法可以强制syncdb显示错误的完整堆栈跟踪。
我尝试添加--verbosity 2,但这没有帮助。

感谢您的反馈。

最佳答案

This ticket可能是相关的,特别是:



我注意到您在requirements.txt中指定了Django 1.5。您的第三方应用程序之一可能是设计用于Django 1.6+的?

10-08 06:42