Autocomplete in List Filters

160 views
Skip to first unread message

Stas Fomin

unread,
Jul 2, 2018, 11:43:31 AM7/2/18
to Django Grappelli
Hello!

In my model, I have classes where related classes have 1M rows, so I cannot use standard list filter interface with classic dropdown listboxes.

1) Reading https://django-grappelli.readthedocs.io/en/latest/customization.html#autocomplete-lookups I am not sure
can autocompleting be implemented for List Filters?
According to my experience — no, but may be I miss something?

2) I also tried https://github.com/frnhr/django-grappelli-filters , I does not work since Django 1.9,  I made some quick fixes (stop crashing) but still cannot made it working (with RelatedAutocompleteFilter).
May be someone have positive experience with it?

3) Looks like Django 2.0 admin (which, unfortunately Python 3 only) have autocomplete fields based on Select2 widget https://docs.djangoproject.com/en/2.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.autocomplete_fields
Have anyone tried this? Does in have autocomplete in list filter?

  Thanks all in advance,
     Sincerely, Stas Fomin

Stas Fomin

unread,
Jul 2, 2018, 11:43:37 AM7/2/18
to Django Grappelli
Reply all
Reply to author
Forward
0 new messages