categorylanri import qilish qoshildi

This commit is contained in:
Husanjonazamov
2026-03-26 14:06:37 +05:00
parent 00f9e6be54
commit bcea5f4a70
13 changed files with 319 additions and 56 deletions

View File

@@ -8,6 +8,13 @@ from core.apps.vendors.models import CategoryModel
class CategoryAdmin(ModelAdmin):
list_display = (
"id",
"__str__",
"title",
"section",
"photo",
"photo_url",
"is_publish",
"order",
)
search_fields = ("title", "firestore_id")
list_filter = ("section", "is_publish")

View File

@@ -8,13 +8,26 @@ from core.apps.vendors.models import ProductimageModel, VendorproductModel
class VendorproductAdmin(ModelAdmin):
list_display = (
"id",
"__str__",
"name",
"vendor",
"category",
"section",
"price",
"quantity",
"is_publish",
"image",
)
search_fields = ("name", "firestore_id", "vendor")
list_filter = ("is_publish", "category", "section")
autocomplete_fields = ("category", "section")
@admin.register(ProductimageModel)
class ProductimageAdmin(ModelAdmin):
list_display = (
"id",
"__str__",
"product",
"image",
"order",
)
list_filter = ("product",)