Telemeta icon indicating copy to clipboard operation
Telemeta copied to clipboard

Auto-completion

Open lluc opened this issue 8 years ago • 3 comments

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.

lluc avatar Oct 19 '16 09:10 lluc

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.

lluc avatar Nov 02 '16 12:11 lluc

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

yomguy avatar Nov 02 '16 17:11 yomguy

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.

lluc avatar Nov 03 '16 09:11 lluc