Skip to main content

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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_admin_range-0.1.5.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_admin_range-0.1.5-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file django_admin_range-0.1.5.tar.gz.

File metadata

  • Download URL: django_admin_range-0.1.5.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for django_admin_range-0.1.5.tar.gz
Algorithm Hash digest
SHA256 e3f2a39ea18a14ebcf1dcf7fab3b3270dcc8bc4c832b80c7b3e25759e324be0b
MD5 3224ac14731510820563707fe6cb2ad0
BLAKE2b-256 2152926f1abbfa90e522fbe182fff673ed3544b3585310b6b946e681fe614bf1

See more details on using hashes here.

File details

Details for the file django_admin_range-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for django_admin_range-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b92ef2c032e81687d60a52b21cf6e1a6b5a1772f3cab34e7b06c7dd9011d823b
MD5 bcb506d7329590c21978a3c2e7b39284
BLAKE2b-256 ad38de20c7885d6c5b9b9b2538ea6ce849cd1f2b2ef2edc9ea35cd8069d2b51c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page