Skip to content

Reusable date, datetime, and numeric range filters for Django admin in new UI style.

License

Notifications You must be signed in to change notification settings

arifogluisa/django-admin-range

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPI Downloads

django-admin-range

Reusable date, datetime, and numeric range filters for Django admin with modern UI design. Compatible with Django's default admin, Jazzmin, and Grappelli admin interfaces. Install the package and drop the filters straight into list_filter — the templates, CSS, and JS are bundled so you do not have to wire up static files manually.

Inspired by django-admin-rangefilter

Examples

Default Django Admin

Django Default Admin

Jazzmin Theme

Jazzmin Theme

Grappelli Theme

Grappelli Theme

Installation

# with uv
uv add django-admin-range

# or pip
pip install django-admin-range

Add the app to INSTALLED_APPS so Django can discover the bundled templates and static assets:

INSTALLED_APPS = [
    # ...
    "django_admin_range",
]

Usage

from django.contrib import admin
from django_admin_range.filters import date_range_filter, datetime_range_filter, numeric_range_filter


@admin.register(Invoice)
class InvoiceAdmin(admin.ModelAdmin):
    list_filter = [
        date_range_filter("created_at", "Created"),
        datetime_range_filter("paid_at", "Paid at"),
        numeric_range_filter("total", "Total amount"),
    ]

That is it. The admin changelist will render the range controls and load the package's CSS/JS automatically.

License

Released under MIT License.

Supporting

About

Reusable date, datetime, and numeric range filters for Django admin in new UI style.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published