ModuleNotFoundError: No module named 'haystack.backends.whoosh_cn_backend'錯誤

ModuleNotFoundError: No module named 'haystack.backends.whoosh_cn_backend’錯誤

找到settings,將python

HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.whoosh_cn_backend.WhooshEngine',
        'PATH': os.path.join(BASE_DIR, 'whoosh_index'),
    }
}

改成django

HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
        'PATH': os.path.join(BASE_DIR, 'whoosh_index'),
    }
}

由於python的django框架在2.0版本以上已經不存在whoosh_cn_backend框架

相關文章
相關標籤/搜索