I want to implement an automatic completion function on crawled data.

Asked 2 years ago, Updated 2 years ago, 56 views

Hello.

I want to implement a function that automatically completes data crawled from a specific website when searched in the search box.

Among them, any data in the item model can be entered

I want it to be completed automatically completed.

For example, I would like to implement a function that automatically completes germany below if I only enter ger among the country data scratched in {{Item.country}}} in the search box.

I've seen several examples of autocomplete, but it's not implemented as I wanted, so I'm asking for a solution.

django

2022-09-21 14:37

1 Answers

It's a lengthy and irrelevant function.

Usually, it is a feature that receives json or xml data from the server side with ajax and implements it on the client (JavaScript).

In other words, when an event (alphabet input) occurs in JavaScript, ajax request is made to the server side, and the received data is parsed and displayed.

In Jango, you only have to produce the export in the form of json or xml, and the rest will work on JavaScript.


2022-09-21 14:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.