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

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

File metadata

File hashes

Hashes for django-admin-daterange-listfilter-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5167bb43bae0756387c3e9d4fb3400e673c9b07b23903cbc700cff7bed4cd2d2
MD5 b2fae0699804436c53eaa1aeaad26fda
BLAKE2b-256 35def844fe729416f756c976eceebfe03b71b522f909eadde926e5f4751265a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_admin_daterange_listfilter-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0f7fc595653c75ddab77901a58f1cc84405b0ad903efbbe2e065716fab122471
MD5 f16f71ef618f3d714bd032b4628f11d3
BLAKE2b-256 2399f56a39c11651e5af89b21098a94e60d2c9e8d3584fd27bbe30563a3cd5c5

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