Improve admin handling
This commit is contained in:
parent
5a08fcad6b
commit
489169f95b
1 changed files with 1 additions and 6 deletions
|
@ -81,18 +81,12 @@ class OrganizationMembershipAdmin(admin.ModelAdmin):
|
||||||
date_hierarchy = "date_joined"
|
date_hierarchy = "date_joined"
|
||||||
|
|
||||||
|
|
||||||
class ServiceInline(admin.TabularInline):
|
|
||||||
model = Service
|
|
||||||
extra = 1
|
|
||||||
|
|
||||||
|
|
||||||
@admin.register(ServiceCategory)
|
@admin.register(ServiceCategory)
|
||||||
class ServiceCategoryAdmin(admin.ModelAdmin):
|
class ServiceCategoryAdmin(admin.ModelAdmin):
|
||||||
list_display = ("name", "parent")
|
list_display = ("name", "parent")
|
||||||
list_filter = ("parent",)
|
list_filter = ("parent",)
|
||||||
search_fields = ("name", "description")
|
search_fields = ("name", "description")
|
||||||
autocomplete_fields = ("parent",)
|
autocomplete_fields = ("parent",)
|
||||||
inlines = (ServiceInline,)
|
|
||||||
|
|
||||||
|
|
||||||
class PlanInline(admin.TabularInline):
|
class PlanInline(admin.TabularInline):
|
||||||
|
@ -137,3 +131,4 @@ class ServiceOfferingAdmin(admin.ModelAdmin):
|
||||||
search_fields = ("description",)
|
search_fields = ("description",)
|
||||||
autocomplete_fields = ("service", "provider")
|
autocomplete_fields = ("service", "provider")
|
||||||
filter_horizontal = ("control_plane",)
|
filter_horizontal = ("control_plane",)
|
||||||
|
inlines = (PlanInline,)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue