-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrates collections text to RichTextBlock
- Loading branch information
Showing
2 changed files
with
281 additions
and
6 deletions.
There are no files selected for viewing
279 changes: 279 additions & 0 deletions
279
ov_collections/migrations/0013_alter_collection_content.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,279 @@ | ||
# Generated by Django 5.0.6 on 2024-05-20 20:58 | ||
|
||
import wagtail.blocks | ||
import wagtail.fields | ||
import wagtail.images.blocks | ||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("ov_collections", "0012_remove_collection_aapb_records_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="collection", | ||
name="content", | ||
field=wagtail.fields.StreamField( | ||
[ | ||
( | ||
"interviews", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"guids", | ||
wagtail.blocks.TextBlock( | ||
help_text="AAPB record IDs, separated by whitespace", | ||
required=True, | ||
), | ||
), | ||
( | ||
"show_title", | ||
wagtail.blocks.BooleanBlock( | ||
default=True, | ||
help_text="Show asset title(s)", | ||
required=False, | ||
), | ||
), | ||
( | ||
"show_thumbnail", | ||
wagtail.blocks.BooleanBlock( | ||
default=True, | ||
help_text="Show asset thumbnail(s)", | ||
required=False, | ||
), | ||
), | ||
( | ||
"title", | ||
wagtail.blocks.RichTextBlock( | ||
features=["italic"], | ||
help_text="The title of this group", | ||
max_length=1024, | ||
required=False, | ||
), | ||
), | ||
], | ||
icon="openquote", | ||
label="Interviews", | ||
), | ||
), | ||
( | ||
"archival_footage", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"guids", | ||
wagtail.blocks.TextBlock( | ||
help_text="AAPB record IDs, separated by whitespace", | ||
required=True, | ||
), | ||
), | ||
( | ||
"show_title", | ||
wagtail.blocks.BooleanBlock( | ||
default=True, | ||
help_text="Show asset title(s)", | ||
required=False, | ||
), | ||
), | ||
( | ||
"show_thumbnail", | ||
wagtail.blocks.BooleanBlock( | ||
default=True, | ||
help_text="Show asset thumbnail(s)", | ||
required=False, | ||
), | ||
), | ||
( | ||
"title", | ||
wagtail.blocks.RichTextBlock( | ||
features=["italic"], | ||
help_text="The title of this group", | ||
max_length=1024, | ||
required=False, | ||
), | ||
), | ||
], | ||
icon="clipboard-list", | ||
label="Archival Footage", | ||
), | ||
), | ||
( | ||
"photographs", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"guids", | ||
wagtail.blocks.TextBlock( | ||
help_text="AAPB record IDs, separated by whitespace", | ||
required=True, | ||
), | ||
), | ||
( | ||
"show_title", | ||
wagtail.blocks.BooleanBlock( | ||
default=True, | ||
help_text="Show asset title(s)", | ||
required=False, | ||
), | ||
), | ||
( | ||
"show_thumbnail", | ||
wagtail.blocks.BooleanBlock( | ||
default=True, | ||
help_text="Show asset thumbnail(s)", | ||
required=False, | ||
), | ||
), | ||
( | ||
"title", | ||
wagtail.blocks.RichTextBlock( | ||
features=["italic"], | ||
help_text="The title of this group", | ||
max_length=1024, | ||
required=False, | ||
), | ||
), | ||
], | ||
icon="copy", | ||
label="Photographs", | ||
), | ||
), | ||
( | ||
"original_footage", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"guids", | ||
wagtail.blocks.TextBlock( | ||
help_text="AAPB record IDs, separated by whitespace", | ||
required=True, | ||
), | ||
), | ||
( | ||
"show_title", | ||
wagtail.blocks.BooleanBlock( | ||
default=True, | ||
help_text="Show asset title(s)", | ||
required=False, | ||
), | ||
), | ||
( | ||
"show_thumbnail", | ||
wagtail.blocks.BooleanBlock( | ||
default=True, | ||
help_text="Show asset thumbnail(s)", | ||
required=False, | ||
), | ||
), | ||
( | ||
"title", | ||
wagtail.blocks.RichTextBlock( | ||
features=["italic"], | ||
help_text="The title of this group", | ||
max_length=1024, | ||
required=False, | ||
), | ||
), | ||
], | ||
icon="doc-full-inverse", | ||
label="Original Footage", | ||
), | ||
), | ||
( | ||
"programs", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"guids", | ||
wagtail.blocks.TextBlock( | ||
help_text="AAPB record IDs, separated by whitespace", | ||
required=True, | ||
), | ||
), | ||
( | ||
"show_title", | ||
wagtail.blocks.BooleanBlock( | ||
default=True, | ||
help_text="Show asset title(s)", | ||
required=False, | ||
), | ||
), | ||
( | ||
"show_thumbnail", | ||
wagtail.blocks.BooleanBlock( | ||
default=True, | ||
help_text="Show asset thumbnail(s)", | ||
required=False, | ||
), | ||
), | ||
( | ||
"title", | ||
wagtail.blocks.RichTextBlock( | ||
features=["italic"], | ||
help_text="The title of this group", | ||
max_length=1024, | ||
required=False, | ||
), | ||
), | ||
], | ||
icon="desktop", | ||
label="Programs", | ||
), | ||
), | ||
( | ||
"related_content", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"guids", | ||
wagtail.blocks.TextBlock( | ||
help_text="AAPB record IDs, separated by whitespace", | ||
required=True, | ||
), | ||
), | ||
( | ||
"show_title", | ||
wagtail.blocks.BooleanBlock( | ||
default=True, | ||
help_text="Show asset title(s)", | ||
required=False, | ||
), | ||
), | ||
( | ||
"show_thumbnail", | ||
wagtail.blocks.BooleanBlock( | ||
default=True, | ||
help_text="Show asset thumbnail(s)", | ||
required=False, | ||
), | ||
), | ||
( | ||
"title", | ||
wagtail.blocks.RichTextBlock( | ||
features=["italic"], | ||
help_text="The title of this group", | ||
max_length=1024, | ||
required=False, | ||
), | ||
), | ||
], | ||
icon="table", | ||
label="Related Content", | ||
), | ||
), | ||
("credits", wagtail.blocks.RichTextBlock(icon="form")), | ||
( | ||
"heading", | ||
wagtail.blocks.RichTextBlock( | ||
features=["italic"], form_classname="title", icon="title" | ||
), | ||
), | ||
("text", wagtail.blocks.RichTextBlock()), | ||
("image", wagtail.images.blocks.ImageChooserBlock()), | ||
("html", wagtail.blocks.RawHTMLBlock(label="HTML")), | ||
] | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters