我正在使用Django 1.4和最新的南部''ENGINE':'django.db.backends.mysql' 我向南添加了instal_apps syncdb返回此错误:
ment/commands/__init__.py", line 13, in <module>
from south.management.commands.syncdb import Command as SyncCommand
File "/usr/local/lib/python2.7/dist-packages/South-0.7.6-py2.7.egg/south/management/commands/syncdb.py", line 17, in <module>
from south.db import dbs
File "/usr/local/lib/python2.7/dist-packages/South-0.7.6-py2.7.egg/south/db/__init__.py", line 44, in <module>
if db_settings['ENGINE'] in engine_modules
KeyError: 'ENGINE'
这取自settings.py:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'db',
'USER': 'root',
'PASSWORD': '1111',
'HOST': '',
'PORT': '',
},
'OPTIONS': {
'init_command': 'SET storage_engine=INNODB,character_set_connection=utf8,collation_connection=utf8_unicode_ci'
},
}
我是否需要在设置中添加一些变量?
答案 0 :(得分:1)
尝试删除OPTIONS dict。这对我有用