from django.db import models

from wagtail.core.models import Page
from wagtail.core.fields import StreamField
from wagtail.core import blocks
from wagtail.admin.edit_handlers import StreamFieldPanel
from wagtail.embeds.blocks import EmbedBlock
from wagtail.images.edit_handlers import ImageChooserPanel


class HomePage(Page):

    body = StreamField([
        ('heading', blocks.CharBlock(classname="full title", icon="title")),
        ('paragraph', blocks.RichTextBlock(icon="pilcrow")),
        ('embed', EmbedBlock(icon="media")),
    ], null=True, blank=True)

    background_image = models.ForeignKey(
        'wagtailimages.Image',
        related_name="background_image",
        null=True,
        blank=True,
        on_delete=models.SET_NULL
    )

    content_panels = Page.content_panels + [
        StreamFieldPanel('body'),
        ImageChooserPanel('background_image'),
    ]
6ec65de484d32bea2bf305df4a69ec4554dc56a2
<mask token>

<mask token>


class HomePage(Page):
    <mask token>
    <mask token>
    <mask token>

<mask token>


class HomePage(Page):
    body = StreamField([('heading', blocks.CharBlock(classname='full title',
        icon='title')), ('paragraph', blocks.RichTextBlock(icon='pilcrow')),
        ('embed', EmbedBlock(icon='media'))], null=True, blank=True)
    background_image = models.ForeignKey('wagtailimages.Image',
        related_name='background_image', null=True, blank=True, on_delete=
        models.SET_NULL)
    content_panels = Page.content_panels + [StreamFieldPanel('body'),
        ImageChooserPanel('background_image')]

from django.db import models
from wagtail.core.models import Page
from wagtail.core.fields import StreamField
from wagtail.core import blocks
from wagtail.admin.edit_handlers import StreamFieldPanel
from wagtail.embeds.blocks import EmbedBlock
from wagtail.images.edit_handlers import ImageChooserPanel


class HomePage(Page):
    body = StreamField([('heading', blocks.CharBlock(classname='full title',
        icon='title')), ('paragraph', blocks.RichTextBlock(icon='pilcrow')),
        ('embed', EmbedBlock(icon='media'))], null=True, blank=True)
    background_image = models.ForeignKey('wagtailimages.Image',
        related_name='background_image', null=True, blank=True, on_delete=
        models.SET_NULL)
    content_panels = Page.content_panels + [StreamFieldPanel('body'),
        ImageChooserPanel('background_image')]

from django.db import models

from wagtail.core.models import Page
from wagtail.core.fields import StreamField
from wagtail.core import blocks
from wagtail.admin.edit_handlers import StreamFieldPanel
from wagtail.embeds.blocks import EmbedBlock
from wagtail.images.edit_handlers import ImageChooserPanel


class HomePage(Page):

    body = StreamField([
        ('heading', blocks.CharBlock(classname="full title", icon="title")),
        ('paragraph', blocks.RichTextBlock(icon="pilcrow")),
        ('embed', EmbedBlock(icon="media")),
    ], null=True, blank=True)

    background_image = models.ForeignKey(
        'wagtailimages.Image',
        related_name="background_image",
        null=True,
        blank=True,
        on_delete=models.SET_NULL
    )

    content_panels = Page.content_panels + [
        StreamFieldPanel('body'),
        ImageChooserPanel('background_image'),
    ]