对于一个搜索引擎来说,至少应该能够根据用户的搜索关键词对搜索结果进行排序以及高亮关键字。现在我们就来使用 django-haystack 实现这些特性。
具体的Django haystack安装和配置教程:https://www.zmrenwu.com/post/45/
- 下面是我具体的错误信息
思路:应该是编码的问题 - 查看官网(http://haystacksearch.org/)有具体的安装教程
1. Install the package:
①.Latest stable (2.6.0) off PyPI: pip install django-haystack
②.Latest dev off GitHub: pip install -e git+https://github.com/django-haystack/django-haystack.git@master#egg=django-haystack
2. Add haystack to your INSTALLED_APPS.
3. Create search_indexes.py files for your models.
4. Setup the main SearchIndex via autodiscover.
5. Include haystack.urls to your URLconf.
6. Search!
解决方案
采用github的方式安装就成功了
ps:两种安装方式有什么区别,我也不懂? 望路过的大佬们指正或讲解下