当前位置: 动力学知识库 > 问答 > 编程问答 >

python - Followed the Haystack tutorial to the "T" but still won't work

问题描述:

I am trying to implement search functionality to my Django web app, and after doing so research it seems as if everyone likes haystack mixed with elasticsearch the most. I've been trying to follow along with the haystack tutorial here:

http://django-haystack.readthedocs.io/en/v2.4.1/tutorial.html

but I am encountering 2 main problems. For one, my terminal is saying I am missing the dependency elasticsearch, and it says this as soon as I add this to my urlconf:

(r'^search/', include('haystack.urls')),

I did every thing the tutorial says to do so I am not sure what the problem is, and it seems like no one else is really encountering this. I redid the whole tutorial incase it was a stupid typo, but I have the same outcome. This still might just be me being incompetent but either way I can't figure it out. The other problem is just me being confused about the search template which is set up near the end of the tutorial. It doesn't explain exactly what it is so I am not sure if this is the input field for entering in the query, or if this is what displays the results for the query or what. It also does not explain how to configure this to your own code. I'm sure I could figure all this out in terms of the template if the project would run and I could do some debugging, but the terminal stops it because of the uninstalled dependency mentioned earlier. Anyways it would be awesome if anybody could help me with this or just point me in the right direction, thanks.

分享给朋友:
您可能感兴趣的文章:
随机阅读: