InStuckColorsInLine extra update
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user