Additional filters for django-admin.
Project description
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:
MyModelAdmin(admin.ModelAdmin):
list_filter = [
BooleanAnnotationFilter.init('my_annotated_attribute'),
...
]
Filter classes
- DropdownFilter
Dropdown filter for all kind of fields.
- ChoicesDropdownFilter
Dropdown filter for fields using choices.
- RelatedDropdownFilter
Dropdown filter for relation fields.
- RelatedOnlyDropdownFilter
Dropdown filter for relation fields using limit_choices_to.
- MultiSelectFilter
Multi select filter for all kind of fields.
- MultiSelectRelatedFilter
Multi select filter for relation fields.
- MultiSelectRelatedOnlyFilter
Multi select filter for related fields with choices limited to the objects involved in that relation
- MultiSelectDropdownFilter
Multi select dropdown filter for all kind of fields.
- MultiSelectRelatedDropdownFilter
Multi select dropdown filter for relation fields.
- BooleanAnnotationFilter
Filter for annotated boolean-attributes.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-more-admin-filters-1.4.tar.gz.
File metadata
- Download URL: django-more-admin-filters-1.4.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08e48e3d0e3e87bcdf6673a2d4de7e56b01e7d56c7365d7cb6db788072becdcd
|
|
| MD5 |
5f950dcc519e7c2d0cc2ed33534d078d
|
|
| BLAKE2b-256 |
d15e2c7071ce90de67c6cbdf6a6ea7b84fd168126d9701a7249c675370c64541
|
File details
Details for the file django_more_admin_filters-1.4-py3-none-any.whl.
File metadata
- Download URL: django_more_admin_filters-1.4-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66e5b4c23079566797fb4a38c577f93841ec75b63aa2fa8bb7301f605def3e28
|
|
| MD5 |
5ba5755b1d9c35d9afba089c08161585
|
|
| BLAKE2b-256 |
2e70c0c7e766012e5b25e966cbeda747ba9203a10240305140e001b175251025
|