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翻译。

v0.1.5

  • 添加default_app_config以增强兼容性。

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.5.tar.gz.

File metadata

File hashes

Hashes for django-admin-daterange-listfilter-0.1.5.tar.gz
Algorithm Hash digest
SHA256 87264b12c698d6477e2d3551a48baec4ceefefd019e94df91958868d04cfdfda
MD5 01489e0dd5103a561325acfbdba013d9
BLAKE2b-256 75b3f861fb3fd84c75d39ebd1613ac4ae15576915e8fb477d0a951fd15fb7112

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_admin_daterange_listfilter-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9b40d8107df5ec6683d26fac6d9718fe47eb33ed2f9ca414ccdf58a06158b76a
MD5 8c258f8e05f0c9a098c84a23d0004010
BLAKE2b-256 9b861407018df91c9c212b875f94d3840d3db6121aab222dd93399a271314def

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