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

This commit is contained in:
2026-02-27 14:56:23 +05:00
commit 0229a0595c
118 changed files with 33948 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
from .category import * # noqa
from .gallery import * # noqa
from .geology import * # noqa
from .photo import * # noqa

View File

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

View File

@@ -0,0 +1,21 @@
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")

View File

@@ -0,0 +1,48 @@
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",
)
},
),
)

View File

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