Skip to main content

Integrates django-admin-rangefilter into Wagtail's ModelAdmin

Project description

Wagtail Rangefilter

PyPI License Wagtail Rangefilter CI

Integrates django-admin-rangefilter into Wagtail's ModelAdmin

Screenshot

Links

Supported versions

  • Python 3.8, 3.9, 3.10, 3.11
  • Django 3.2, 4.2
  • Wagtail 4.1, 5.1, 5.2, 6.0 (with external package wagtail-modeladmin)

Installation

NOTE: Starting with wagtail 5.0 you can install and use the external package wagtail-modeladmin, with 6.0+ you have to use it.

pip install wagtail-rangefilter

Add this to your installed django applications:

INSTALLED_APPS = [
    ...,
    'wagtail_rangefilter',
    'rangefilter',
    ...,
]

Example usage

# Starting with Wagtail 6.0, the external package "wagtail-modeladmin" is required:
# from wagtail_modeladmin.options import ModelAdmin
from wagtail.contrib.modeladmin.options import ModelAdmin
from wagtail_rangefilter.filters import DateRangeFilter, DateTimeRangeFilter

class ExampleAdmin(ModelAdmin):
    ...
    list_filter = (("test_date", DateRangeFilter), ("test_datetime", DateTimeRangeFilter),)
    ...

Development

pip install -e '.[testing]' -U

Running the testapp

tox -e interactive

Alternative:

cp tests/local.py.example tests/local.py
python manage.py runserver

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

wagtail-rangefilter-0.2.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

wagtail_rangefilter-0.2.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file wagtail-rangefilter-0.2.1.tar.gz.

File metadata

  • Download URL: wagtail-rangefilter-0.2.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for wagtail-rangefilter-0.2.1.tar.gz
Algorithm Hash digest
SHA256 74fde188e13e44766f1e106c91be540ca1cdf032251f233d6b3e4ea7ecd57ace
MD5 bafff3f27afbba056717d0d07f1b329e
BLAKE2b-256 d78ce46f08aed99a4892daf09966edcb25820c87c3f34d99c68945a840852d35

See more details on using hashes here.

File details

Details for the file wagtail_rangefilter-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for wagtail_rangefilter-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 54bff60260f23340a3f8bc1728c5eb19462f2a83173e0349f3b061095da39bbd
MD5 a5163ca72bd867ff4c80cb6d05d2419d
BLAKE2b-256 033327dbff404bcc24c747b6219c28968c78a4d8abcaf346b2b46108f8b89457

See more details on using hashes here.

Supported by

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