Skip to content
Snippets Groups Projects
Commit 71bba122 authored by Štěpán Farka's avatar Štěpán Farka Committed by jan.bednarik
Browse files

[ADD] text block to people page

parent 005e5dd0
No related branches found
No related tags found
2 merge requests!564Release,!558Enhancements 11
# Generated by Django 4.0.4 on 2022-06-27 13:45
import wagtail.core.blocks
import wagtail.core.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0091_alter_districthomepage_subheader"),
]
operations = [
migrations.AlterField(
model_name="districtpeoplepage",
name="content",
field=wagtail.core.fields.StreamField(
[
(
"text",
wagtail.core.blocks.RichTextBlock(
features=[
"h2",
"h3",
"h4",
"h5",
"bold",
"italic",
"ol",
"ul",
"hr",
"link",
"document-link",
"image",
"superscript",
"subscript",
"strikethrough",
"blockquote",
],
label="Textový editor",
),
),
(
"people_group",
wagtail.core.blocks.StructBlock(
[
(
"group_title",
wagtail.core.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"person_list",
wagtail.core.blocks.ListBlock(
wagtail.core.blocks.StructBlock(
[
(
"position",
wagtail.core.blocks.CharBlock(
label="Název pozice",
required=False,
),
),
(
"person",
wagtail.core.blocks.PageChooserBlock(
label="Osoba",
page_type=[
"district.DistrictPersonPage"
],
),
),
]
),
label="List osob",
),
),
]
),
),
],
blank=True,
verbose_name="Obsah stránky",
),
),
]
......@@ -737,7 +737,15 @@ class DistrictPeoplePage(
### FIELDS
content = StreamField(
[("people_group", blocks.PeopleGroupListBlock())],
[
(
"text",
blocks.RichTextBlock(
label="Textový editor", features=RICH_TEXT_DEFAULT_FEATURES
),
),
("people_group", blocks.PeopleGroupListBlock()),
],
verbose_name="Obsah stránky",
blank=True,
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment