adminka togirlandi
Some checks failed
Deploy Django Application to Server / deploy (push) Failing after 10s
Telegram Notifications / Telegram Gate (push) Failing after 5s

This commit is contained in:
Husanjonazamov
2026-03-03 15:23:11 +05:00
parent 8d172c6393
commit 2add18b8d2
11 changed files with 69 additions and 353 deletions

View File

@@ -1,11 +1,10 @@
from django.contrib import admin
from unfold.admin import ModelAdmin # noqa
from apps.geology.models import Category
@admin.register(Category)
class CategoryAdmin(ModelAdmin):
class CategoryAdmin(admin.ModelAdmin):
list_display = ("name", "created_at", "updated_at")
search_fields = ("name",)
list_filter = ("created_at", "updated_at")

View File

@@ -1,20 +1,18 @@
from django.contrib import admin
from unfold.admin import ModelAdmin
from apps.geology.models import GalleryCategory, Gallery
@admin.register(GalleryCategory)
class GalleryCategoryAdmin(ModelAdmin):
class GalleryCategoryAdmin(admin.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):
class GalleryAdmin(admin.ModelAdmin):
list_display = ("id", "name", "created_at", "updated_at")
search_fields = ("name",)
list_filter = ("created_at", "updated_at")

View File

@@ -1,11 +1,10 @@
from django.contrib import admin
from unfold.admin import ModelAdmin # noqa
from apps.geology.models import Geology
@admin.register(Geology)
class GeologyAdmin(ModelAdmin):
class GeologyAdmin(admin.ModelAdmin):
list_display = ("name", "category", "created_at", "updated_at")
search_fields = ("name", "title", "body1", "body2", "body3")
list_filter = ("category", "created_at", "updated_at")

View File

@@ -1,11 +1,10 @@
from django.contrib import admin
from unfold.admin import ModelAdmin # noqa
from apps.geology.models import Photo
@admin.register(Photo)
class PhotoAdmin(ModelAdmin):
class PhotoAdmin(admin.ModelAdmin):
list_display = ("name", "description", "type", "size", "image", "created_at")
search_fields = ("name", "description", "type", "size", "image")
list_filter = ("type",)