Files
backend/apps/geology/admin/geology.py
A'zamov Samandar 0229a0595c
Some checks failed
Deploy Django Application to Server / deploy (push) Failing after 19s
Telegram Notifications / Telegram Gate (push) Failing after 5s
gealogiuya
2026-02-27 14:56:23 +05:00

49 lines
1.3 KiB
Python

from django.contrib import admin
from unfold.admin import ModelAdmin # noqa
from apps.geology.models import Geology
@admin.register(Geology)
class GeologyAdmin(ModelAdmin):
list_display = ("name", "category", "created_at", "updated_at")
search_fields = ("name", "title", "body1", "body2", "body3")
list_filter = ("category", "created_at", "updated_at")
filter_horizontal = ("photos1", "photos2")
readonly_fields = ("created_at", "updated_at")
autocomplete_fields = ("category",)
fieldsets = (
(
"Asosiy ma'lumotlar",
{
"fields": (
"category",
"banner_title",
"banner",
"name",
"title",
"body1",
"address",
"image",
"location",
"composition",
"isp",
"analysis",
"body2",
"photos1",
"body3",
"photos2",
)
},
),
(
"Qo'shimcha ma'lumotlar",
{
"fields": (
"created_at",
"updated_at",
)
},
),
)