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.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | da596a7bc7b6a74421bb85984debee82a6e37862f38384aa85799d0e20db0e7c |
|
MD5 | c7477a6a965d2c48442c1d359eccd202 |
|
BLAKE2b-256 | 1f5e3c8b667c32c808a0e328c8356933b7458e90b591c5f006ccf56172aaeedf |
Close
Hashes for django_admin_rangefilter-0.5.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d699a586d3a4124d15c177c8457202820b76241916041e88148806eaecec0e7 |
|
MD5 | 9b59665b677c7da0cc571bffaa32569b |
|
BLAKE2b-256 | f3aff4a09e26fcffa6b16531fccceee0e352ef1f3802b6e0acae9f5929d5b7b5 |