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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44a62eca17dcc36ea60312c6076463c11b81294420c727fa667d0f8ec6d5c54c |
|
MD5 | 61154a84849904aebd00c9d9a3b8a295 |
|
BLAKE2b-256 | 25e6f38268be19fbe20ffa771bbb06970506a89d73c6641467d6fd54f83c4a1e |
Close
Hashes for django_admin_rangefilter-0.5.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9de20ff967ee55e7e40a0fb38529f3fb5df346efe20b1e46e1865c3021093cfa |
|
MD5 | ea1304358549e790da2c1757d221ce4a |
|
BLAKE2b-256 | 01ba1b1c6172c8475ab6b08c11a78a102c2f33d50ba57a1203a4b84b61904c9a |