
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
django-daterangefilter-fixed
Advanced tools
Application adds three Django admin list filters: DateRangeFilter
, PastDateRangeFilter
and FutureDateRangeFilter
. These filters let user filter models by date range. PastDateRangeFilter
and FutureDateRangeFilter
add quick selection of predefined date ranges. Filters can be applied to any model date fields. Application supports default Django admin theme and Suit theme.
Install django-daterangefilter
using pip:
pip install django-daterangefilter
Add daterangefilter
to INSTALLED_APPS
. Example:
INSTALLED_APPS = (
...
'daterangefilter',
...
)
Application uses static files so do not forget to issue collectstatic
management command in production environment.
in admin.py:
from django.contrib import admin
from daterangefilter.filters import PastDateRangeFilter, FutureDateRangeFilter
@admin.register(Post)
class PostAdmin(admin.ModelAdmin):
list_filter = [
('created_at', PastDateRangeFilter), ('publish_at', FutureDateRangeFilter)
]
Predefined ranges can be completely redefined by overriding _past_ranges.html
and _future_ranges.html
templates.
Take into account that these templates are inserted in the middle of the javascript code and may contain nothing but ranges
definition. For more examples on using moment
library refer to library documentation.
Filter widget uses a great JavaScript date range picker component - Date Range Picker by Dan Grossman.
FAQs
Date range filter for Django admin fixed for django 4.x
We found that django-daterangefilter-fixed demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.