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

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

File metadata

File hashes

Hashes for django-admin-daterange-listfilter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 aa7bbbb1a49d2b882ba0ca312fe4128174dff17fa45981a79bbb47fa33ee19a6
MD5 69f15921235c1d6c59d73fe5a8223b38
BLAKE2b-256 f596bef2afe308b2dcdb3a1c76d8e9a08b278ad81f15e5e61a4ce6c29e634576

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_admin_daterange_listfilter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 03a8b90468e75cbcb28728a0f1bb6948852ebcdcd4296ef65c2913fb949fe041
MD5 31df8097bc99ea6c401b9ed34c510755
BLAKE2b-256 ff40063128bf0c930335f54c64eb98c5ccbc4dcd2133ab7ba9b7f09a54449c01

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