Connect with us


Implementing Autocomplete in Django



Autocompletes are based on 3 moving parts:

  • widget compatible with the model field, does the initial rendering,
  • javascript widget initialization code, to trigger the autocomplete,
  • and a view used by the widget script to get results from.

Create an autocomplete view¶
The only purpose of the autocomplete view is to serve relevant suggestions for
the widget to propose to the user. DAL leverages Djangos class based views
and Mixins to for code reuse.

Click here to view the original article.