New changes
This commit is contained in:
parent
bd2de38428
commit
5ddcf13803
2 changed files with 15 additions and 7 deletions
|
@ -14,7 +14,6 @@ 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
|
||||
|
@ -186,8 +185,7 @@ class ArticlePage(Page):
|
|||
('info', InfoBlock(icon='help')),
|
||||
('media', ChoiceBlock(choices=[
|
||||
('gallery', 'Image gallery'),
|
||||
], icon='media')),
|
||||
('iframe', EmbedBlock())
|
||||
], icon='media'))
|
||||
], null=True, blank=True)
|
||||
body_fr = StreamField([
|
||||
('paragraph', RichTextBlock()),
|
||||
|
@ -195,8 +193,7 @@ class ArticlePage(Page):
|
|||
('info', InfoBlock(icon='help')),
|
||||
('media', ChoiceBlock(choices=[
|
||||
('gallery', 'Image gallery'),
|
||||
], icon='media')),
|
||||
('iframe', EmbedBlock())
|
||||
], icon='media'))
|
||||
], null=True, blank=True)
|
||||
body_en = StreamField([
|
||||
('paragraph', RichTextBlock()),
|
||||
|
@ -204,8 +201,7 @@ class ArticlePage(Page):
|
|||
('info', InfoBlock(icon='help')),
|
||||
('media', ChoiceBlock(choices=[
|
||||
('gallery', 'Image gallery'),
|
||||
], icon='media')),
|
||||
('iframe', EmbedBlock())
|
||||
], icon='media'))
|
||||
], null=True, blank=True)
|
||||
trans_body = TranslatedField(
|
||||
'body_de',
|
||||
|
@ -218,6 +214,8 @@ class ArticlePage(Page):
|
|||
on_homepage = models.BooleanField(default=False, verbose_name="Featured",
|
||||
help_text="Auf der Frontpage anzeigen")
|
||||
|
||||
html_content = RichTextField(blank=True)
|
||||
|
||||
feed_image = models.ForeignKey(
|
||||
'wagtailimages.Image',
|
||||
null=True, blank=True,
|
||||
|
@ -260,6 +258,9 @@ class ArticlePage(Page):
|
|||
], heading="Images"),
|
||||
StreamFieldPanel('gallery'),
|
||||
]
|
||||
content_panels = Page.content_panels + [
|
||||
FieldPanel('html_content', classname='full'),
|
||||
]
|
||||
promote_panels = [
|
||||
InlinePanel('related_links', label="Links"),
|
||||
MultiFieldPanel([
|
||||
|
|
|
@ -31,6 +31,13 @@
|
|||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if page.html_content %}
|
||||
<!-- Any other content -->
|
||||
<div class="article-body">
|
||||
{{ page.html_content|richtext }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Infoblocks -->
|
||||
<div class="row infoblocks">
|
||||
{% for block in page.trans_body %}
|
||||
|
|
Loading…
Add table
Reference in a new issue