Files
backend/apps/geology/admin/gallery.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

22 lines
668 B
Python

from django.contrib import admin
from unfold.admin import ModelAdmin
from apps.geology.models import GalleryCategory, Gallery
@admin.register(GalleryCategory)
class GalleryCategoryAdmin(ModelAdmin):
list_display = ("id", "name", "created_at", "updated_at")
search_fields = ("name",)
filter_horizontal = ("gallery",)
list_filter = ("created_at", "updated_at")
exclude = ("count",)
@admin.register(Gallery)
class GalleryAdmin(ModelAdmin):
list_display = ("id", "name", "created_at", "updated_at")
search_fields = ("name",)
list_filter = ("created_at", "updated_at")
exclude = ("type", "created_at", "updated_at", "name", "size")