Skip to main content

通过日历自由选择时间范围。

Project description

django-admin-daterange-listfilter

通过日历自由选择时间范围。

使用方法

settings.py

INSTALLED_APPS = [
    ...
    "django_static_jquery_ui",
    "django_middleware_global_request",
    "django_listfilter_media_extension",
    "django_admin_daterange_listfilter",
    ...
]

admin.py

from django.contrib import admin
from django_admin_daterange_listfilter.filters import DateRangeFilter
from .models import Category


class CategoryAdmin(admin.ModelAdmin):
    list_display = [
        "title",
        "add_time",
        "mod_time",
    ]
    list_filter = [
        ("add_time", DateRangeFilter),
        ("mod_time", DateRangeFilter),
    ]


admin.site.register(Category, CategoryAdmin)

版本记录

v0.1.0

  • 版本首发。

v0.1.3

  • 添加中文i18n翻译。

Project details


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

File details

Details for the file django-admin-daterange-listfilter-0.1.3.tar.gz.

File metadata

File hashes

Hashes for django-admin-daterange-listfilter-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f114bf2a0f26fb3dc184932e70e223833d76552d6257cf92b0280caa565649bf
MD5 6a65c35dfea227c3bf1cb0cce5b7dcff
BLAKE2b-256 c49a290f049b3ec568a4ca3d3af5de58883a601c6fe536476870672ae72a193c

See more details on using hashes here.

File details

Details for the file django_admin_daterange_listfilter-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_admin_daterange_listfilter-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ebc58814d4466ba6c1c3f3da85fa7351f0bd164533ba818c651e1eecdb755854
MD5 fabe8ec9477e3bb7c81084cc306d474a
BLAKE2b-256 1376446d0b409b5b6cabc4b456213f8a14507ad9ce42a8dc3357d43607d83fad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page