Add contents to the content panels of the content block
This commit is contained in:
parent
ca294b7836
commit
ca6c5742b4
|
|
@ -12,7 +12,7 @@ import logging
|
|||
from django.db import models
|
||||
|
||||
from wagtail.admin.edit_handlers import FieldPanel, TabbedInterface, \
|
||||
ObjectList
|
||||
ObjectList, StreamFieldPanel
|
||||
from wagtail.core.fields import StreamField
|
||||
from wagtail.core.models import Page
|
||||
from wagtail.images.blocks import ImageChooserBlock
|
||||
|
|
@ -33,7 +33,7 @@ class ContentBlock(Page):
|
|||
('student_entry', StudentEntryBlock(icon='download')),
|
||||
('image', ImageChooserBlock(icon='image')),
|
||||
('task', TextBlock(icon='tick'))
|
||||
])
|
||||
], null=True, blank=True)
|
||||
|
||||
type = models.CharField(
|
||||
max_length=100,
|
||||
|
|
@ -47,6 +47,8 @@ class ContentBlock(Page):
|
|||
|
||||
content_panels = [
|
||||
FieldPanel('title', classname="full title"),
|
||||
FieldPanel('type'),
|
||||
StreamFieldPanel('contents')
|
||||
]
|
||||
|
||||
settings_panels = [
|
||||
|
|
|
|||
Loading…
Reference in New Issue