InStuckColorsInLine extra update

This commit is contained in:
Parsa Nazer
2025-02-02 03:16:31 +03:30
parent abddb1bdc1
commit 7474bd7034
+11 -2
View File
@@ -12,7 +12,7 @@ from unfold.widgets import (
from unfold.decorators import action, display
class InStuckColorsInLine(TabularInline):
model = InStuckColors
extra = 1
extra = 0
formfield_overrides = {
models.CharField: {"widget": UnfoldAdminColorInputWidget()},
}
@@ -51,7 +51,16 @@ class ProductModelAdmin(ModelAdmin, ImportExportModelAdmin):
# "squared": True,
},
]
return ()
return ('خالی',)
# @display(
# description=("نمایش در صفحه ی اصلی"),
# label={
# True: "danger",
# False: "success",
# },
# )
# def display_show(self, instance):
# return instance.show
@admin.register(MainCategoryModel)