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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2b77568b57e65c14d76aa3fae7e5d0a9caa93335e116c3377d9c1f43d233dbb |
|
MD5 | 5f7a94c1e95511caa5816e628f486638 |
|
BLAKE2b-256 | fa4e15c613bfbe1f866e460d9c239f8e9cf9c93937527306458f84d74646ae1c |
Close
Hashes for django_admin_rangefilter-0.5.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 088cde1ec1d81ab6053b939d7ef5cb4a3991f295b558422e763d4760b96b21e3 |
|
MD5 | 36d2856123d28aefe94528063d6bbeff |
|
BLAKE2b-256 | aeacee2e4b986ab9c53e161a439c44cd9369b4b325bd555f92c077fcce3a80c2 |