Files
django-nepkit/example/demo/admin.py
T
sankalp 09f302ceaa feat: implement HTMX support, DRF filters, and professionalized documentation
- Implement server-side location chaining with HTMX support via `htmx=True` in fields and widgets.
- Update location views to handle HTMX requests and return HTML <option> fragments.
- Add NepaliDateYearFilter and NepaliDateRangeFilter for robust DRF API filtering.
- Expand default `DATE_INPUT_FORMATS` in configuration to support multiple common Nepali date styles.
- Update DRF serializers to automatically respect global `NEPKIT` configuration settings.
- Add `django-filter` as an optional dependency under the `drf` extra in pyproject.toml.
- Correct underlying dependency references from `nepali-datetime` to nepali library.
- Complete overhaul of README.md for premium DX, including new sections for storage behavior, timezone awareness, and API usage.
2026-01-30 15:22:13 +05:45

26 lines
565 B
Python

from django.contrib import admin
from django_nepkit import NepaliModelAdmin
from .models import Person
@admin.register(Person)
class PersonAdmin(NepaliModelAdmin):
list_display = (
"name",
"birth_date",
"birth_date_ne",
"phone_number",
"province",
"province_ne",
"district",
"district_ne",
"municipality",
"municipality_ne",
"created_at",
"updated_at",
)
list_filter = ("birth_date", "province", "district")
search_fields = ("name", "phone_number")