Additional filters for django-admin.
Low maintenance activity. Last release 11 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install django-more-admin-filtersWelcome to django-more-admin-filters
Note If you are looking for a generic way of building and applying complex filters with a dynamic form right in the django admin backend, please checkout django-searchkit.
Description
Django-more-admin-filters is a collection of Django admin filters with a focus on filters using dropdown widgets, multiple choice filters and filters working with annotated attributes.
Installation
Install from pypi.org:
pip install django-more-admin-filters
Add more_admin_filters to your installed apps:
INSTALLED_APPS = [
'more_admin_filters',
...
]
Use the filter classes with your ModelAdmin:
from more_admin_filters import MultiSelectDropdownFilter
class MyModelAdmin(admin.ModelAdmin):
...
list_filter = [
('myfield', MultiSelectDropdownFilter),
...
]
Since the ModelAdmin routine to initialize the list filters doesn't work with annotated attributes, the usage for an annotation filter is a little bit special. The filter class needs to be equipped with the attribute's name: