Telemeta
Telemeta copied to clipboard
Auto-completion
Which type of field can have an auto-complete feature ? What can we do use it ? Is it in the Javascript source or in Python source ?
Thanks.
I found an interesting part of code in the file https://github.com/Parisson/Telemeta/blob/master/telemeta/static/telemeta/js/advanceSearch.js#L104
with function activate_autocomplete(selector, attribute).
Unfortunately, it doesn't run proprely when I use it in the form to edit an item. :-(
There is this error :
Uncaught TypeError: Cannot read property 'opera' of undefined
in jquery.autocomplete.js:83.
I'm afraid the auto-complete feature of the search engine is made only for queries through the ElasticSearch wrapper based on Haystack. I suggest to try some frontend interfaces linked to django-auto-complete-light, maybe like this one : https://github.com/novafloss/django-agnocomplete
It's not a good idea : requirement for django-agnocomplete is Django 1.8 or Django 1.9 . :-1: So, waiting the next version of Telemeta, is why I want to use a code similar to your code in the function activate_autocomplete.