Skip to main content

Welcome to django-more-admin-filters

Run tests for django-more-admin-filters coveralls badge python: 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3,13 django: 2.2, 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 6.0

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:

MyModelAdmin(admin.ModelAdmin):
    list_filter = [
        BooleanAnnotationFilter.init('my_annotated_attribute'),
        ...
    ]

Filter classes

  • DropdownFilter Dropdown filter for all kinds 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 kinds 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 kinds of fields.
  • MultiSelectRelatedDropdownFilter Multi select dropdown filter for relation fields.
  • MultiSelectRelatedOnlyDropdownFilter Multi select dropdown filter for relation fields with choices limited to the objects involved in that relation.
  • BooleanAnnotationFilter Filter for annotated boolean attributes.

Note More kinds of annotation filters will be added in future versions.

Release files for django-more-admin-filters 1.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-more-admin-filters 1.15
File Size Uploaded
django_more_admin_filters-1.15.tar.gz 16.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-more-admin-filters 1.15
File Interpreter ABI Platform
django_more_admin_filters-1.15-py3-none-any.whl Python 3 none any Details

Total release size: 51.2 kB

Release files / django_more_admin_filters-1.15.tar.gz

Download URL django_more_admin_filters-1.15.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4cc7f3b0f43d80d4aaa65f96ab45b44d7e1f80f05a055ae33c31865eeb18ea69
BLAKE2b-256 checksum
How to use checksums
3462a260ea5f810789fe08c98bb942d2c2fa951db69d724fe0a92ada48776e4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release files / django_more_admin_filters-1.15-py3-none-any.whl

Download URL django_more_admin_filters-1.15-py3-none-any.whl
Size 34.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d20866cb9cf412fe1177a845b89c9cc9f9a8fc623a46effcd809f490a4c888b
BLAKE2b-256 checksum
How to use checksums
6f228c9d9e1be72d29c7d32810d1a41743cabec63028030815e17d550d4bc079
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

1.15 This release

2 release files

1.14

2 release files

1.13

2 release files

1.12

2 release files

1.11

2 release files

1.10

2 release files

1.9

2 release files

1.8

2 release files

1.7

2 release files

1.6

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page