Django Haystack Rebuild Index

匆匆过客 提交于 2019-12-11 01:37:57

问题


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.

When I type ./manage.py rebuild_index, I get the error:

Unknown command: rebuild_index

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.


回答1:


Do you have haystack in your INSTALLED_APPS?

manage.py learns new commands by importing the settings.py file and loading modules from your INSTALLED_APPS variable.



来源:https://stackoverflow.com/questions/5525765/django-haystack-rebuild-index

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!