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.4

  • 添加中文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.4.tar.gz.

File metadata

File hashes

Hashes for django-admin-daterange-listfilter-0.1.4.tar.gz
Algorithm Hash digest
SHA256 446cf91e7e6a25b77800ccb92c98189cf126845a715f18fb9b20206818287f53
MD5 62dbadb7e41d9f8c3dd7f23de9bba3c3
BLAKE2b-256 556a9ced9589c80132bd287e0d61db196c0df3c31c5d376e746de3adc4f5d327

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_admin_daterange_listfilter-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 152c0c82e8f0a99fe6931063f33333376efa4fecaaa6029153f0b2e5838be9cd
MD5 3e90280edf47f17306b96e818c64471a
BLAKE2b-256 41e07d7c096aa69f56ba210f1527236483f4327d17e8f2a0dd2bed0f0237da4f

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