.. index:: pair: Django ; base.html .. _autocomplete_5: ============================================================================ 2016-10-18 improve the jquery-ui autocomplete look and feel ============================================================================ .. seealso:: - http://api.jqueryui.com/autocomplete/ - https://jqueryui.com/autocomplete/ - https://jqueryui.com/autocomplete/#combobox .. contents:: :depth: 3 Last look ========== .. seealso:: - http://127.0.0.1:8004/projects/project/1/update/ :: (django_test_autocomplete_35_64) C:\projects_id3\django-test-autocomplete\projet_ajax>python manage.py runserver 127.0.0.1:8004 Performing system checks... :: System check identified no issues (0 silenced). October 19, 2016 - 09:08:19 Django version 1.10.2, using settings 'projet_ajax.settings' Starting development server at http://127.0.0.1:8004/ Quit the server with CTRL-BREAK. .. figure:: ../4__18_octobre_2016/ok_saisie_champion.png :align: center .. literalinclude:: ../../../../../projet_ajax/projects/templates/projects/project/update.html :linenos: :language: django .. literalinclude:: ../../../../../projet_ajax/projects/forms.py :linenos: jquery-ui autocomplete options already used =========================================== Remote option --------------- - https://jqueryui.com/autocomplete/#remote The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are bird names, displayed when at least two characters are entered into the field. The datasource is a server-side script which returns JSON data, specified via a simple URL for the source-option. In addition, the minLength-option is set to 2 to avoid queries that would return too many results and the select-event is used to display some feedback. .. code-block:: html jQuery UI Autocomplete - Remote datasource
Result:
Try https://jqueryui.com/autocomplete/#combobox ================================================= .. seealso:: - http://www.learningjquery.com/2010/06/a-jquery-ui-combobox-under-the-hood Try https://jqueryui.com/autocomplete/#maxheight ================================================= .. seealso:: - https://jqueryui.com/autocomplete/#maxheight .. code-block:: html jQuery UI Autocomplete - Scrollable results
Try https://jqueryui.com/autocomplete/#categories =================================================== .. seealso:: - https://jqueryui.com/autocomplete/#categories :: jQuery UI Autocomplete - Categories Try https://jqueryui.com/autocomplete/#remote-jsonp ==================================================== .. seealso:: - https://jqueryui.com/autocomplete/#remote-jsonp :: jQuery UI Autocomplete - Remote JSONP datasource
Result: