Reusable date, datetime, and numeric range filters for Django admin in new UI style. Compatible with Django's default admin, Jazzmin, and Grappelli admin interfaces.
Project description
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
Jazzmin 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
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_admin_range-0.1.9.tar.gz.
File metadata
- Download URL: django_admin_range-0.1.9.tar.gz
- Upload date:
- Size: 22.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bf9839ffb4891bd82bea799fda13bb7a142ad0fae0c9a1bfd80912e85087d1e
|
|
| MD5 |
f6cb142acc6d42b25392db7e81fcf05d
|
|
| BLAKE2b-256 |
d671eac0954019b4a3fb54b877def481c4aa85ff8c3011b66f9f172ef689297b
|
File details
Details for the file django_admin_range-0.1.9-py3-none-any.whl.
File metadata
- Download URL: django_admin_range-0.1.9-py3-none-any.whl
- Upload date:
- Size: 81.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c7b54ff4d0fc72d4a66ef7b9f1bffef5429ce65d03a5f7eb708b86ee865e955
|
|
| MD5 |
46e14aa806c22e3c739a5a11a3bc3a2d
|
|
| BLAKE2b-256 |
dacb3aad9b41caa81d1bb9c1b2d2f868a85645d7205472ac88600f252b98b8f4
|