django admin when field is autocomplete it overrides ModelForm filter

The autocomplete_fields use different logic because it’s built on the JavaScript Select2 library.

See the docs at autocomplete_fields.

No, they don’t work the same, no, you can’t make it work the same, and yes, if you want to customize the results, you need to work with how it works.

Also see get_search_results.

There was also this conversation here in the forum: Django Admin Autocomplete Field Search Customization

1 Like