update
This commit is contained in:
39
core/apps/api/admin/common.py
Normal file
39
core/apps/api/admin/common.py
Normal file
@@ -0,0 +1,39 @@
|
||||
from django.contrib import admin
|
||||
from unfold.admin import ModelAdmin
|
||||
|
||||
from core.apps.api.models import ColorModel, SizeModel
|
||||
from core.apps.api.models import AdTopPlanModel
|
||||
from core.apps.api.models import TagsModel
|
||||
|
||||
|
||||
@admin.register(ColorModel)
|
||||
class ColorAdmin(ModelAdmin):
|
||||
list_display = (
|
||||
"id",
|
||||
"__str__",
|
||||
)
|
||||
|
||||
|
||||
@admin.register(SizeModel)
|
||||
class SizeAdmin(ModelAdmin):
|
||||
list_display = (
|
||||
"id",
|
||||
"__str__",
|
||||
)
|
||||
|
||||
|
||||
@admin.register(AdTopPlanModel)
|
||||
class AdTopPlanAdmin(ModelAdmin):
|
||||
list_display = (
|
||||
"id",
|
||||
"__str__",
|
||||
)
|
||||
|
||||
|
||||
@admin.register(TagsModel)
|
||||
class TagsAdmin(ModelAdmin):
|
||||
search_fields = ["name"]
|
||||
list_display = (
|
||||
"id",
|
||||
"__str__",
|
||||
)
|
||||
Reference in New Issue
Block a user