20 lines
617 B
Python
20 lines
617 B
Python
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register
|
|
from .models import BasicKnowledge, InstrumentCategory, InstrumentType
|
|
|
|
|
|
class InstrumentAdmin(ModelAdmin):
|
|
model = BasicKnowledge
|
|
menu_label = 'Instruments'
|
|
list_display = ('title', 'new_type', 'status_string')
|
|
search_fields = ('title', 'new_type__name')
|
|
|
|
class InstrumentCategoryAdmin(ModelAdmin):
|
|
model = InstrumentCategory
|
|
|
|
class InstrumentTypeAdmin(ModelAdmin):
|
|
model = InstrumentType
|
|
|
|
modeladmin_register(InstrumentAdmin)
|
|
modeladmin_register(InstrumentCategoryAdmin)
|
|
modeladmin_register(InstrumentTypeAdmin)
|