From bd2de384287c249b411bf930037965caef0c1a4c Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 15 May 2023 18:14:06 +0530 Subject: [PATCH] Add iframe block for article page --- publichealth/home/models/models.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/publichealth/home/models/models.py b/publichealth/home/models/models.py index 1ad4c20..fce7401 100644 --- a/publichealth/home/models/models.py +++ b/publichealth/home/models/models.py @@ -14,6 +14,7 @@ from wagtail.core.blocks import StructBlock, CharBlock, URLBlock, RichTextBlock, from wagtail.core.models import Page, Orderable from wagtail.core.fields import StreamField, RichTextField from wagtail.admin.edit_handlers import FieldPanel, StreamFieldPanel, InlinePanel, MultiFieldPanel +from wagtail.embeds.blocks import EmbedBlock from wagtail.images.blocks import ImageChooserBlock from wagtail.images.edit_handlers import ImageChooserPanel from wagtail.search import index @@ -185,7 +186,8 @@ class ArticlePage(Page): ('info', InfoBlock(icon='help')), ('media', ChoiceBlock(choices=[ ('gallery', 'Image gallery'), - ], icon='media')) + ], icon='media')), + ('iframe', EmbedBlock()) ], null=True, blank=True) body_fr = StreamField([ ('paragraph', RichTextBlock()), @@ -193,7 +195,8 @@ class ArticlePage(Page): ('info', InfoBlock(icon='help')), ('media', ChoiceBlock(choices=[ ('gallery', 'Image gallery'), - ], icon='media')) + ], icon='media')), + ('iframe', EmbedBlock()) ], null=True, blank=True) body_en = StreamField([ ('paragraph', RichTextBlock()), @@ -201,7 +204,8 @@ class ArticlePage(Page): ('info', InfoBlock(icon='help')), ('media', ChoiceBlock(choices=[ ('gallery', 'Image gallery'), - ], icon='media')) + ], icon='media')), + ('iframe', EmbedBlock()) ], null=True, blank=True) trans_body = TranslatedField( 'body_de',