Update wagtail definitions

This commit is contained in:
Ramon Wenger 2022-04-04 10:58:09 +02:00
parent d50479c04d
commit e699ea86f9
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ from .models import BasicKnowledge
class InstrumentAdmin(ModelAdmin):
model = BasicKnowledge
menu_label = 'Instruments'
list_display = ('title',)
list_display = ('title', 'new_type')
modeladmin_register(InstrumentAdmin)

View File

@ -5,6 +5,7 @@ from wagtail.admin.edit_handlers import FieldPanel, TabbedInterface, ObjectList,
from wagtail.core.blocks import StreamBlock
from wagtail.core.fields import StreamField
from wagtail.images.blocks import ImageChooserBlock
from wagtail.admin.edit_handlers import CommentPanel
from books.blocks import TextBlock, BasicKnowledgeBlock, LinkBlock, VideoBlock, DocumentBlock, \
ImageUrlBlock, AssignmentBlock, InfogramBlock, GeniallyBlock, SubtitleBlock, SurveyBlock, ModuleRoomSlugBlock, \
@ -81,16 +82,15 @@ class ContentBlock(StrictHierarchyPage):
]
settings_panels = [
FieldPanel('slug')
FieldPanel('slug'),
CommentPanel()
]
#
edit_handler = TabbedInterface([
ObjectList(content_panels, heading='Content'),
ObjectList(settings_panels, heading='Settings'),
])
template = 'generic_page.html'
parent_page_types = ['books.Chapter']
subpage_types = []