Issue #18 open

JQuery autocomplete code - dependencies are not documented properly

Luke Plant
created an issue

Judging from the docs here: https://bitbucket.org/tyrion/django-autocomplete/src/tip/docs/library/widgets.rst#cl-125 I am guess that the autocomplete plugin that must be used is the one found here:

http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

(It matches in terms of the dependencies listed).

However, that plugin doesn't work at all. Browsing the source, it clearly does not accept a dictionary with 'source' and 'select' arguments, which is what jquery_autocomplete.js is passing to it.

It appears that the correct autocomplete plugin is the one that is part of jQuery UI 1.8 - http://docs.jquery.com/UI/Autocomplete

This took a lot of debugging to find out!

The corrected docs should look something like: {{{

!python

class Media:
    extend = False
    css = {'all': ('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css',),
           }
    js = (
        "http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.js",
        "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.js",
        "js/jquery_autocomplete.js")

}}}

Comments (2)

  1. Log in to comment