Edit ForeignKey, ManyToManyField and CharField in Django Admin using jQuery UI AutoComplete.

_images/kiss.png _images/kiss-all.png

Quick Usage

Define a lookup channel:

# yourapp/
from ajax_select import register, LookupChannel
from .models import Tag

class TagsLookup(LookupChannel):

    model = Tag

    def get_query(self, q, request):
        return self.model.objects.filter(name__icontains=q).order_by('name')[:50]

    def format_item_display(self, item):
        return u"<span class='tag'>%s</span>" %

Add field to a form:

# yourapp/
class DocumentForm(ModelForm):

    class Meta:
        model = Document

    tags = AutoCompleteSelectMultipleField('tags')

Fully customizable

  • search query
  • query other resources besides Django ORM
  • format results with HTML
  • custom styling
  • customize security policy
  • customize UI
  • integrate with other UI elements on page using the javascript API

Assets included by default



  • Django >=1.5, <=1.9
  • Python >=2.7, <=3.4