ModuleNotFoundError: No module named 'haystack.backends.whoosh

ModuleNotFoundError: No module named 'haystack.backends.whoosh_cn_backend’错误

找到settings,将

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

改为

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

因为python的django框架在2.0版本以上已经不存在whoosh_cn_backend

转载于:https://www.cnblogs.com/whason/p/10778089.html

最新回复(0)
/jishu53O2nRLw6eGnwP9PskG03JWZnKirfO6APB5C0de0u2U_3D4858670
8 简首页