Collection of Django Admin filters
Project description
django-adminfilters
Collection of extra filters for the Django admin site
https://user-images.githubusercontent.com/27282/153727131-d875f946-a8a8-4d89-be83-1d8cb5c9391a.mp4
Filters
- Autocomplete
- AutocompleteFilter
- Simple
- ValueFilter
- Combobox
- AllValuesComboFilter
- RelatedFieldComboFilter
- ChoicesFieldComboFilter
- Dates
- DateRangeFilter
- Radio
- AllValuesRadioFilter
- RelatedFieldRadioFilter
- ChoicesFieldRadioFilter
- BooleanRadioFilter
- Checkbox
- RelatedFieldCheckBoxFilter
- Multiple
- MultiValueFilter
- ManyToMany
- IntersectionFieldListFilter
- UnionFieldListFilter
- JSON
- JsonFieldFilter
- Number
- NumberFilter
- Special
- QueryStringFilter
- DjangoLookupFilter
- PermissionPrefixFilter
FYI
Filters management (save/retrieve), is handled by an optional application adminfilters.depot
that,
due to the Django filters internal design, it uses GET method to save filter definition to the database.
When you use FilterDepotManager
to save a filter, the call is idempotent but not safe.
Usage examples
class MyModel(models.Model):
index = models.CharField(max_length=255)
name = models.CharField(max_length=255)
age = models.IntegerField()
flag = models.CharField(default="1", choices=(("0", "Flag 1"), ("1", "Flag 2"))
household = models.ForeignKey("Household")
custom = JSONField(default=dict, blank=True)
class MyModelAdmin(ModelAdmin):
list_filter = (
FilterDepotManager, # needs `adminfilters.depot` app
QueryStringFilter,
DjangoLookupFilter,
("custom", JsonFieldFilter.factory(can_negate=False, options=True)),
("flag", ChoicesFieldComboFilter),
("household", AutoCompleteFilter)
("name", ValueFilter.factory(lookup="istartswith"),
("age", NumberFilter),
)
Run demo app
git clone https://github.com/saxix/django-adminfilters.git
cd django-adminfilters
python3 -m venv .venv
source .venv/bin/activate
make develop
make demo
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_adminfilters-2.6.tar.gz
.
File metadata
- Download URL: django_adminfilters-2.6.tar.gz
- Upload date:
- Size: 27.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
e9d57869a7f696a0b972b2b482d7ac69285f38a28d527270670bc7588653fdfd
|
|
MD5 |
fd24589921f9bf212d353c7e59f7547b
|
|
BLAKE2b-256 |
6b2ff7a6605117e2adf2a69be8d32dd5d2df94769f39473e433fba35cc354bc5
|
Provenance
The following attestation bundles were made for django_adminfilters-2.6.tar.gz
:
Publisher:
release.yml
on saxix/django-adminfilters
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
django_adminfilters-2.6.tar.gz
-
Subject digest:
e9d57869a7f696a0b972b2b482d7ac69285f38a28d527270670bc7588653fdfd
- Sigstore transparency entry: 191504435
- Sigstore integration time:
-
Permalink:
saxix/django-adminfilters@a8af75deed0a26a4e53959c692a56cf02bce0c88
-
Branch / Tag:
refs/tags/2.6
- Owner: https://github.com/saxix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
release.yml@a8af75deed0a26a4e53959c692a56cf02bce0c88
-
Trigger Event:
push
-
Statement type:
File details
Details for the file django_adminfilters-2.6-py3-none-any.whl
.
File metadata
- Download URL: django_adminfilters-2.6-py3-none-any.whl
- Upload date:
- Size: 53.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b5bd60a73ff8ea154fd109ff7e85e623096653a0bf4c087dee14d044f8a5fa73
|
|
MD5 |
a2c94aafdcbccce8fccbb5647490a756
|
|
BLAKE2b-256 |
4e5df58005d14f062a448d4bda26f799e84e675576bfe0a669a83d138e0a8dad
|
Provenance
The following attestation bundles were made for django_adminfilters-2.6-py3-none-any.whl
:
Publisher:
release.yml
on saxix/django-adminfilters
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
django_adminfilters-2.6-py3-none-any.whl
-
Subject digest:
b5bd60a73ff8ea154fd109ff7e85e623096653a0bf4c087dee14d044f8a5fa73
- Sigstore transparency entry: 191504436
- Sigstore integration time:
-
Permalink:
saxix/django-adminfilters@a8af75deed0a26a4e53959c692a56cf02bce0c88
-
Branch / Tag:
refs/tags/2.6
- Owner: https://github.com/saxix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
release.yml@a8af75deed0a26a4e53959c692a56cf02bce0c88
-
Trigger Event:
push
-
Statement type: