surface-security / django-surface-theme

django admin theme based on https://appseed.us/admin-dashboards/django-dashboard-atlantis-dark
MIT License
3 stars 4 forks source link

refactor RelatedFieldAjaxListFilter #11

Open fopinappb opened 2 years ago

fopinappb commented 2 years ago

RelatedFieldAjaxListFilter came from django-jet.

Django has supported autocomplete-fields since Django 2.0 but only for change forms, not for list filters.

Refactor this filter to reuse the same endpoint (clean up and reduce complexity)

There seems to be many existing projects like django-admin-autocomplete-filter. Maybe re-use the code or just include the package.

It would also be nice to include to include an Ajax version for SimpleListFilter so it can be used on any custom filters (instead of only related fields).