我正在使用 Django 1.4 和最新的 south + 'ENGINE': 'django.db.backends.mysql' 我将 south 添加到 installed_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'
},
}
我需要在设置中添加一些变量吗?