from wagtail.core import blocks from wagtail.core.blocks.field_block import RichTextBlock from wagtail.documents.blocks import DocumentChooserBlock DEFAULT_RICH_TEXT_FEATURES = ['bold', 'italic', 'link', 'ol', 'ul'] class LinkBlock(blocks.StructBlock): url = blocks.URLBlock() description = blocks.CharBlock() class DocumentBlock(blocks.StructBlock): document = DocumentChooserBlock() description = blocks.CharBlock() class TextBlock(blocks.StructBlock): text = RichTextBlock() class ModalTextBlock(blocks.StructBlock): description = RichTextBlock() modal_content = RichTextBlock() class StudentEntryBlock(blocks.StructBlock): task_text = blocks.CharBlock() # class ImageBlock