Package: dal-admin-filters
dal_admin_filtersDjango-autocomplete-light filters for django admin.default select2 widgetwidget with title as placeholderRequirementsThis is extension for django-autocomplete-light so you need to install and configure it too.Here will be minimum setup for example.Refer tohttp://django-autocomplete-light.readthedocs.io/for more detailed instructions.InstallationInstall using pippip install django-autocomplete-light dal_admin_filtersUpdate INSTALLED_APPS, you need too put django-autocomplete-light before adminINSTALLED_APPS=['dal','dal_select2','dal_admin_filters',#'django.contrib.admin',...otherstuffthere...]ConfigurationCreate autocomplete viewLet our models look like thisclassCountry(models.Model):name=models.CharField(max_length=100,unique=True)def__str__(self):returnself.nameclassPerson(models.Model):name=models.CharField(max_length=100,unique=True)from_country=models.ForeignKey(Country)def__str__(self):returnself.nameThen autocomplete view for country selection will be similar to nextfromdalimportautocompletefromyour_countries_app.modelsimportCountryclassCountryAutocomplete(autocomplete.Select2QuerySetView):defget_queryset(self):# Don't forget to filter out results depending on the visitor !ifnotself.request.user.is_authenticated():returnCountry.objects.none()qs=Country.objects.all()ifself.q:qs=qs.filter(name__istartswith=self.q)returnqsRegister view in urls.pyfromyour_countries_app.viewsimportCountryAutocompleteurlpatterns=[url(r'^country-autocomplete/$',CountryAutocomplete.as_view(),name='country-autocomplete',),url(r'^admin/',admin.site.urls),]Use filter in your admin.pyfromdjango.contribimportadminfromyour_countries_app.modelsimportCountry,Personfromdal_admin_filtersimportAutocompleteFilter@admin.register(Country)classCountryAdmin(admin.ModelAdmin):passclassCountryFilter(AutocompleteFilter):title='Country from'# filter's titlefield_name='from_country'# field name - ForeignKey to Country modelautocomplete_url='country-autocomplete'# url name of Country autocomplete viewclassCountryPlaceholderFilter(AutocompleteFilter):title='Country from'# filter's titlefield_name='from_country'# field name - ForeignKey to Country modelautocomplete_url='country-autocomplete'# url name of Country autocomplete viewis_placeholder_title=True# filter title will be shown as placeholderclassCountryCustomPlaceholderFilter(AutocompleteFilter):title='Country from'# filter's titleparameter_name='from_country'# field name - ForeignKey to Country modelautocomplete_url='country-autocomplete'# url name of Country autocomplete viewwidget_attrs={'data-placeholder':'Filter by country name'}@admin.register(Person)classPersonAdmin(admin.ModelAdmin):classMedia:# Empty media class is required if you are using autocomplete filterpass# If you know better solution for altering admin.media from filter instance#   - please contact me or make a pull requestlist_filter=[CountryFilter]If setup is done right, you will see the Select2 widget in admin filter in Person's changelist view.Define dependencies between filters (forward)Define forwards in the filter (example from the demo_project)fromdalimportforwardclassPersonFilter(AutocompleteFilter):autocomplete_url='person-autocomplete'title='Owner'field_name='owner'forwards=[forward.Field('from_country__id__exact',# Field name of filter input'country_id'# Field name passed to the autocomplete_url endpoint)]Read more athttps://django-autocomplete-light.readthedocs.io/