django-haystack配置
pip install django-haystack
# 使用es请安装
pip install "django-haystack[elasticsearch]"
本文展示用whoosh检索
import os
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
'PATH': os.pa