django-admin-rangefilter app, add the filter by a custom date range on the admin UI.
Project description
django-admin-rangefilter
django-admin-rangefilter app, add the filter by a custom date / datetime range on the admin UI.
Requirements
Python 2.7+ or Python 3.4+
Django 1.8+
Installation
Use your favorite Python package manager to install the app from PyPI, e.g.
Example:
pip install django-admin-rangefilter
Add rangefilter to INSTALLED_APPS:
Example:
INSTALLED_APPS = (
...
'rangefilter',
...
)
Example usage
In admin
from django.contrib import admin
from rangefilter.filter import DateRangeFilter, DateTimeRangeFilter
from .models import Post
@admin.register(Post)
class PostAdmin(admin.ModelAdmin):
list_filter = (
('created_at', DateRangeFilter), ('updated_at', DateTimeRangeFilter),
)
Support Content-Security-Policy
For Django 1.8+, if django-csp is installed, nonces will be added to style and script tags.
INSTALLED_APPS = (
...
'rangefilter',
'csp',
...
)
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
Close
Hashes for django-admin-rangefilter-0.6.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 300bbde1e78c5476d699552a1d5dbc8486e905818d12d7cfc3ee76e9244a3dbf |
|
MD5 | 9b47d4905865a4bfa5d54b2bd707c35c |
|
BLAKE2b-256 | 5b498085a0273a64ca954ea1e061b506befde20fb8a8a544da354118cf4ac82c |
Close
Hashes for django_admin_rangefilter-0.6.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3958d8d91aee3f0f9e1ea660498947c6fe31efc56b741743e4cc3f78c2c52880 |
|
MD5 | b49828460fb010c80bc1f9fd2447afd6 |
|
BLAKE2b-256 | bdab115ac9847e00fd1a3ca68f40e82a20a593b9914cb55fa5bab22e9cc03ed8 |