Update the admin view of the new models

This commit is contained in:
Ramon Wenger 2022-09-13 16:34:56 +02:00
parent 2b3f9c7ae0
commit b0a57abaa8
1 changed files with 7 additions and 0 deletions

View File

@ -8,11 +8,18 @@ class InstrumentAdmin(ModelAdmin):
list_display = ('title', 'new_type', 'status_string')
search_fields = ('title', 'new_type__name')
class InstrumentCategoryAdmin(ModelAdmin):
model = InstrumentCategory
list_display = ('name', 'background', 'foreground')
class InstrumentTypeAdmin(ModelAdmin):
model = InstrumentType
list_display = ('name', 'category',)
inspect_view_enabled = True
inspect_view_fields = ('name', 'category', 'instruments',)
modeladmin_register(InstrumentAdmin)
modeladmin_register(InstrumentCategoryAdmin)