wagtail-rangefilter 0.2.1

Creator: danarutscher

Last updated:

Add to Cart

Description:

wagtailrangefilter 0.2.1

Wagtail Rangefilter



Integrates django-admin-rangefilter into Wagtail's ModelAdmin

Links

Documentation
Changelog
Contributing

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

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.