Finally there is a real searchkit application for django that integrates best with the django admin backend.
You have tons of admin changelist filters and still you are not able to filter your items exactly as you need it? Or once and again you need a combination of several changelist filters and you are tired of waiting for each filter being applied one after the other? Or you just don't want to write a custom changelist filter for each special requirement of your customers.
Then django-searchkit is for you. Give it a try. You get a nice and handy formset to build complex searches with as many filter rules as you want over all of your model fields or the fields of related models.
- Build and apply complex searches using a dynamic formset.
- Add as many filter rules as you want using django's various field lookups.
- Save and reuse your searches at any time by a handy admin changelist filter.
Install via pip:
pip install django-searchkit
Add searchkit
to your INSTALLED_APPS
:
INSTALLED_APPS = [
'searchkit',
...
]
Add the SearkitFilter
to your ModelAdmin
:
from django.contrib import admin
from searchkit.filters import SearchkitFilter
from .models import MyModel
@admin.register(MyModel)
class MyModelAdmin(admin.ModelAdmin):
...
list_filter = [
SearchkitFilter,
...
]
...
- Open the admin changelist of your Model.
- Click the "Add filter" button of the Searchkit filter.
- Give your Filter a name.
- Configure as many filter rules as you want.
- Click "Save and apply".
- Reuse your filter whenever you want using the Searchkit filter section.