How to autocomplete a search form?

后端 未结 2 2029
既然无缘
既然无缘 2021-01-06 23:36

I have a search form and it works fine. Now I would like my search form autocomplete.I tried using django autocomplete light but I have a problem implementing it.

I

2条回答
  •  滥情空心
    2021-01-06 23:41

    @wobbily_col answer works obviously but generally you want to avoid hitting a relational database to create autocomplete results. I have made an autocomplete library that works fast and is easy to use. But all it does is to give you text results back. It is up to you to feed it data and make its responses in your API. Checkout: https://github.com/wearefair/fast-autocomplete And here is an explanation of how it works: http://zepworks.com/posts/you-autocomplete-me/

提交回复
热议问题