Django Haystack重建索引 [英] Django Haystack Rebuild Index

查看:134
本文介绍了Django Haystack重建索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆