Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
apps/cms: used transalated field from previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Magdalena Noffke authored and rmader committed Jul 2, 2019
1 parent b16dbe2 commit 6771e5a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions apps/cms/pages/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from wagtail.core.models import Page
from wagtail.images.edit_handlers import ImageChooserPanel

from apps.contrib.translations import TranslatedField


class HomePage(Page):
image = models.ForeignKey(
Expand All @@ -26,6 +28,15 @@ class HomePage(Page):
body_en = RichTextField(blank=True)

content_panels = [
body = TranslatedField(
'body_de',
'body_en'
)

subtitle = TranslatedField(
'subtitle_de',
'subtitle_en'
)
FieldPanel('title'),
ImageChooserPanel('image'),
FieldPanel('subtitle'),
Expand All @@ -45,6 +56,10 @@ class SimplePage(Page):

content_panels = Page.content_panels + [
FieldPanel('body', classname='full'),
body = TranslatedField(
'body_de',
'body_en'
)
]

subpage_types = ['a4_candy_cms_pages.SimplePage']

0 comments on commit 6771e5a

Please sign in to comment.