diff --git a/cdhweb/pages/blocks/embed_block.py b/cdhweb/pages/blocks/embed_block.py deleted file mode 100644 index 22be50bb..00000000 --- a/cdhweb/pages/blocks/embed_block.py +++ /dev/null @@ -1,14 +0,0 @@ -from wagtail.embeds.blocks import EmbedBlock - - -class EmbedBlock(EmbedBlock): - class Meta: - icon = "warning" - group = "Deprecated" - - def __init__(self, *args, **kwargs): - kwargs[ - "help_text" - ] = """This block exists to help with data migration. It will be deleted when content loading is complete. - Please use the CDH Hosted Video instead. """ - super().__init__(*args, **kwargs) diff --git a/cdhweb/pages/models.py b/cdhweb/pages/models.py index afdad27a..0025bc45 100644 --- a/cdhweb/pages/models.py +++ b/cdhweb/pages/models.py @@ -11,19 +11,14 @@ from springkit.blocks import CTABlock, JumplinkableH2Block from springkit.models.mixins import JumplinksMixin from taggit.managers import TaggableManager -from wagtail.admin.panels import ( - FieldPanel, - MultiFieldPanel, - ObjectList, - TabbedInterface, -) +from wagtail.admin.panels import FieldPanel, MultiFieldPanel from wagtail.blocks import RichTextBlock, StreamBlock, StructBlock, TextBlock from wagtail.contrib.settings.models import BaseSiteSetting, register_setting from wagtail.documents.blocks import DocumentChooserBlock from wagtail.documents.models import AbstractDocument, DocumentQuerySet +from wagtail.embeds.blocks import EmbedBlock from wagtail.fields import RichTextField, StreamField from wagtail.images.blocks import ImageChooserBlock -from wagtail.images.models import Image from wagtail.models import CollectionMember, Page from wagtail.search import index from wagtail.snippets.blocks import SnippetChooserBlock @@ -36,7 +31,6 @@ from .blocks.article_index_block import ArticleTileBlock from .blocks.cdh_hosted_video import HostedVideo from .blocks.download_block import DownloadBlock -from .blocks.embed_block import EmbedBlock from .blocks.event_index_block import EventTileBlock from .blocks.feature_block import FeatureBlock from .blocks.image_block import ImageBlock @@ -88,8 +82,8 @@ ("tile_block", StandardTileBlock()), ("article_tile_block", ArticleTileBlock()), ("event_tile_block", EventTileBlock()), - ("embed", EmbedBlock()), - ("code", CodeBlock()) + ("embed", EmbedBlock(icon="plus-inverse")), + ("code", CodeBlock()), ]