Add contents to the content panels of the content block

This commit is contained in:
Pawel Kowalski 2018-08-15 11:23:17 +02:00
parent ca294b7836
commit ca6c5742b4
1 changed files with 4 additions and 2 deletions

View File

@ -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 = [