当我运行命令时:
./manage.py generate_sphinx_config cities >> sphinx.conf
返回错误,该设置没有属性DATABASE_ENGINE。我也检查了shell,我无法在设置中找到DATABASE_ENGINE。在安装过程中,我设置了DATABASES。
此处使用DATABASE_ENGINE:https://github.com/dcramer/django-sphinx/blob/master/djangosphinx/utils/config.py
def _get_database_engine():
if settings.DATABASE_ENGINE == 'mysql':
return settings.DATABASE_ENGINE
elif settings.DATABASE_ENGINE.startswith('postgresql'):
return 'pgsql'
raise ValueError, "Only MySQL and PostgreSQL engines are supported by Sphinx."