allow manual ordering of cloud provider
This commit is contained in:
parent
7bd09ec6aa
commit
3f6fc4a86e
4 changed files with 37 additions and 3 deletions
|
@ -68,11 +68,19 @@ class CategoryAdmin(admin.ModelAdmin):
|
|||
|
||||
|
||||
@admin.register(CloudProvider)
|
||||
class CloudProviderAdmin(admin.ModelAdmin):
|
||||
list_display = ("name", "slug", "logo_preview", "disable_listing", "is_featured")
|
||||
class CloudProviderAdmin(SortableAdminMixin, admin.ModelAdmin):
|
||||
list_display = (
|
||||
"name",
|
||||
"slug",
|
||||
"logo_preview",
|
||||
"disable_listing",
|
||||
"is_featured",
|
||||
"order",
|
||||
)
|
||||
search_fields = ("name", "description")
|
||||
prepopulated_fields = {"slug": ("name",)}
|
||||
inlines = [OfferingInline]
|
||||
ordering = ("order",)
|
||||
|
||||
def logo_preview(self, obj):
|
||||
if obj.logo:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue