Django Haystack重建索引 [英] Django Haystack Rebuild Index
问题描述
我正在阅读Haystack的入门指南,并尝试使用Haystack为我的网站实施Whoosh后端。我成功设置了整个项目,并且还可以在search.html模板上看到搜索框。我无法建立索引。
I was reading the 'Getting Started' guide of Haystack and tried to implement Whoosh backend for my website with Haystack. I was successful in setting up the whole project and I can also see the search box on my search.html template. I am unable to build the index though.
键入./manage.py rebuild_index时,出现错误:
When I type ./manage.py rebuild_index, I get the error:
未知命令:rebuild_index
我知道这是一个小问题。我无法理解manage.py文件如何能够理解最初不属于该文件的命令。
I know this is a trivial issue. I am unable to understand how the manage.py file can ever understand commands that were not originally a part of it.
推荐答案
中是否有
?干草堆
INSTALLED_APPS
Do you have haystack
in your INSTALLED_APPS
?
manage.py
通过导入<$ c $来学习新命令c> settings.py 文件并从 INSTALLED_APPS
变量加载模块。
manage.py
learns new commands by importing the settings.py
file and loading modules from your INSTALLED_APPS
variable.
这篇关于Django Haystack重建索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!