Skip to main content

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

Project description

django-admin-range

Reuseable date, datetime, and numeric range filters for Django admin. 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.

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.2.tar.gz (10.3 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.2-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_admin_range-0.1.2.tar.gz
  • Upload date:
  • Size: 10.3 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.2.tar.gz
Algorithm Hash digest
SHA256 a873bb830b1908adef50cafde2028d824a93acbb08f299d88d726ade49143eaf
MD5 56f905e57f45089444dfdba9a1a12bac
BLAKE2b-256 5568af3324e0f5d0996f4835f90504af6fcf7605c268e617bba4f2d4d677619c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_admin_range-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 80be1daa3b94c1145ba00eaa82fd9bf8939e156c5f67da9dff0479a578e1c321
MD5 525e5c9562d51bbe69c03cc438800813
BLAKE2b-256 14fdfc3019a7d558d2c3ea987ac3ad161131c0a26ba2433f33668ae09f94030e

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