Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSRC-112: FeaturedExternalLinkBlock #1730

Merged
merged 7 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions etna/articles/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from etna.core.blocks import (
ContentImageBlock,
FeaturedExternalLinkBlock,
FeaturedPageBlock,
FeaturedRecordArticleBlock,
ParagraphBlock,
PromotedItemBlock,
Expand All @@ -16,6 +18,8 @@


class SectionContentBlock(blocks.StreamBlock):
featured_external_link = FeaturedExternalLinkBlock()
featured_page = FeaturedPageBlock()
featured_record_article = FeaturedRecordArticleBlock()
image = ContentImageBlock()
media = MediaBlock()
Expand Down

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion etna/blog/blocks.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
from wagtail import blocks

from etna.core.blocks import (
CallToActionBlock,
ContactBlock,
ContentImageBlock,
ContentTableBlock,
DocumentsBlock,
FeaturedExternalLinkBlock,
FeaturedPageBlock,
ImageGalleryBlock,
InsetTextBlock,
ParagraphBlock,
QuoteBlock,
SectionDepthAwareStructBlock,
Expand All @@ -18,11 +21,14 @@


class SectionContentBlock(blocks.StreamBlock):
call_to_action = CallToActionBlock()
contact = ContactBlock()
document = DocumentsBlock()
featured_external_link = FeaturedExternalLinkBlock()
featured_page = FeaturedPageBlock()
image = ContentImageBlock()
image_gallery = ImageGalleryBlock()
inset_text = InsetTextBlock()
media = MediaBlock()
paragraph = ParagraphBlock()
quote = QuoteBlock()
Expand All @@ -40,9 +46,10 @@ class Meta:
template = "articles/blocks/section.html"


class BlogPostPageStreamBlock(blocks.StreamBlock):
class BlogPostPageStreamBlock(SectionContentBlock):
"""
A block for the GeneralPage model.
"""

content_section = ContentSectionBlock()
sub_heading = None
Loading
Loading