Skip to main content

django-unfold-admin-list-filter-dropdown

PyPI version

A Django admin filter implementation that renders as a dropdown.

If you have more than ten values for a field that you want to filter by in Django admin, the filtering sidebar gets long, cluttered and hard to use.

This app contains the DropdownFilter class that renders as a drop-down in the filtering sidebar to avoid this problem.

Usage

Install:

pip install django-unfold-admin-list-filter-dropdown

Enable in settings.py:

INSTALLED_APPS = (
    ...
    'django_unfold_admin_listfilter_dropdown',
    ...
)

Use in admin.py:

from django_admin_listfilter_dropdown.filters import DropdownFilter, RelatedDropdownFilter, ChoiceDropdownFilter

class EntityAdmin(admin.ModelAdmin):
    ...
    list_filter = (
        # for ordinary fields
        ('a_charfield', DropdownFilter),
        # for choice fields
        ('a_choicefield', ChoiceDropdownFilter),
        # for related fields
        ('a_foreignkey_field', RelatedDropdownFilter),
    )

Example of a custom filter that uses the provided template:

class CustomFilter(SimpleListFilter):
    template = 'django_unfold_admin_listfilter_dropdown/dropdown_filter.html'

    def lookups(self, request, model_admin):
        ...

    def queryset(self, request, queryset):
        ...

Metadata

Release files for django-unfold-admin-list-filter-dropdown 1.0.12

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-unfold-admin-list-filter-dropdown 1.0.12
File Size Uploaded Provenance Actions
django_unfold_admin_list_filter_dropdown-1.0.12.tar.gz 4.0 kB With provenance Details for django_unfold_admin_list_filter_dropdown-1.0.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-unfold-admin-list-filter-dropdown 1.0.12
File Interpreter ABI Platform Actions
django_unfold_admin_list_filter_dropdown-1.0.12-py3-none-any.whl Python 3 none any Details for django_unfold_admin_list_filter_dropdown-1.0.12-py3-none-any.whl

Total release size: 8.9 kB

Release files / django_unfold_admin_list_filter_dropdown-1.0.12.tar.gz

Download URL django_unfold_admin_list_filter_dropdown-1.0.12.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d52d2d25863424bdef3c09449e5e1d1a404fb36c59a49c6091143b1e13f63769
BLAKE2b-256 checksum
How to use checksums
ce5e28b831dadeb843ca6c30e2e954598c877de4b6930b06e29fef2b51886fa8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 22, 2025.

Transparency log

Release files / django_unfold_admin_list_filter_dropdown-1.0.12-py3-none-any.whl

Download URL django_unfold_admin_list_filter_dropdown-1.0.12-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd1f6311a26daa524ad1185e66178f0aedea217ecb2a9aaf75309fd0dd8f76a0
BLAKE2b-256 checksum
How to use checksums
a837554f8e217c5297cfc804268e07c352dbafcd047ecd4a4b5f55241e9087a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 22, 2025.

Transparency log

Security for django-unfold-admin-list-filter-dropdown 1.0.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_unfold_admin_list_filter_dropdown-1.0.12.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 22, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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