ImportError:无法导入名称信号(haystack)

时间:2014-01-30 11:07:30

标签: python django django-haystack

使用所有设置设置haystack模块和Whoosh。当你尝试./manage.py rebuild_index时 我得到了

Unknown command: 'rebuild_index'
Type 'manage.py help' for usage.

来自shell:

    import haystack
    /Library/Python/2.7/site-packages/django/db/backends/sqlite3/base.py:50: RuntimeWarning: SQLite received a naive datetime (2014-01-30 05:17:29.945926) while time zone support is active.
      RuntimeWarning)
    ---------------------------------------------------------------------------
    ImproperlyConfigured                      Traceback (most recent call last)
    /Library/Python/2.7/site-packages/django/core/management/commands/shell.pyc in <module>()
    ----> 1 import haystack

    /Library/Python/2.7/site-packages/haystack/__init__.py in <module>()
         32 # Check the 2.X+ bits.
         33 if not hasattr(settings, 'HAYSTACK_CONNECTIONS'):
    ---> 34     raise ImproperlyConfigured('The HAYSTACK_CONNECTIONS setting is required.')
         35 if DEFAULT_ALIAS not in settings.HAYSTACK_CONNECTIONS:
         36     raise ImproperlyConfigured("The default alias '%s' must be included in the HAYSTACK_CONNECTIONS setting." % DEFAULT_ALIAS)

    ImproperlyConfigured: The HAYSTACK_CONNECTIONS setting is required.
import haystack
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/Library/Python/2.7/site-packages/django/core/management/commands/shell.pyc in <module>()

有什么想法吗?

0 个答案:

没有答案