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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d046a5a925c10adf3b6b13df825318cee5d7d2703fa805828eb3d39b5e5635c |
|
MD5 | 30bf700e0924ea34dd17cbf68246e952 |
|
BLAKE2b-256 | d1e36f7fc2fdb9e7f7115e0aaaf309ffa269494762b34633f7b80648ee50501e |
Close
Hashes for django_admin_rangefilter-0.6.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9f2f9a79d180e3b13f5359f9e78e1eb9d0eec6d857dfa21fe7a5c4ed40d6745 |
|
MD5 | 243c01c566bf778d1a8e0fdf6584589c |
|
BLAKE2b-256 | 136e3796dc068296dcb8ec31d62a133099661eecc4b1d2b9fd2d202c114ed86a |