nested inline is shit
This commit is contained in:
parent
0c83c0cfe8
commit
12f0314b76
1 changed files with 4 additions and 6 deletions
|
@ -1,5 +1,3 @@
|
|||
from nested_admin import NestedStackedInline, NestedModelAdmin
|
||||
|
||||
from django.contrib import admin
|
||||
from django.utils.html import format_html
|
||||
from adminsortable2.admin import SortableAdminMixin
|
||||
|
@ -19,7 +17,7 @@ from .models import (
|
|||
)
|
||||
|
||||
|
||||
class PlanInline(NestedStackedInline):
|
||||
class PlanInline(admin.StackedInline):
|
||||
model = Plan
|
||||
extra = 1
|
||||
fieldsets = (
|
||||
|
@ -34,7 +32,7 @@ class ExternalLinkOfferingInline(admin.TabularInline):
|
|||
ordering = ("order", "description")
|
||||
|
||||
|
||||
class OfferingInline(NestedStackedInline):
|
||||
class OfferingInline(admin.StackedInline):
|
||||
model = ServiceOffering
|
||||
extra = 1
|
||||
fieldsets = (
|
||||
|
@ -50,7 +48,7 @@ class OfferingInline(NestedStackedInline):
|
|||
},
|
||||
),
|
||||
)
|
||||
inlines = [PlanInline]
|
||||
show_change_link = True
|
||||
|
||||
|
||||
@admin.register(ReusableText)
|
||||
|
@ -70,7 +68,7 @@ class CategoryAdmin(admin.ModelAdmin):
|
|||
|
||||
|
||||
@admin.register(CloudProvider)
|
||||
class CloudProviderAdmin(NestedModelAdmin):
|
||||
class CloudProviderAdmin(admin.ModelAdmin):
|
||||
list_display = ("name", "slug", "logo_preview")
|
||||
search_fields = ("name", "description")
|
||||
prepopulated_fields = {"slug": ("name",)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue