adminka togirlandi
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user