Does anybody know how to implement the jQuery autocomplete plugin in Django, using databases instead of local values?
Specifically I want to implement the “Search Page Replacement” feature mentioned at bottom of the page, the dataset will be approx a thousand or more entries, but I cannot workout how to get it to interact with the necessary fields of my database.
(Am also on the lookout for a good Python/Django search solution to use for my site – which is just a very simple website.)
Thank you for your help.
I rencently did something with jQuery.autocomplete with one model.
funcionality of seach city when user starts to write the name:
according the jqueryui docs to make work the autocomplete you need an input like this:
so, the javascript in my template to attach the lib to this input looks like:
to resolve that URL you have to write something like this in your urls.py
that mean that I have something like cities.views.autocomplete_city view:
what else de you need? start testing and remember DOCUMENTATIONS ARE YOUR FRIEND please TRY to make the things for yourself first, google it, read the docs, try 3 times, if cant, stackoverflow is your friend.