django-sphinx - 设置没有属性DATABASE_ENGINE -

时间:2013-05-08 18:22:22

标签: python django

当我运行命令时:

  ./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."

0 个答案:

没有答案