-
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.
* Initial aapb record type * Fixes lint errors * Combine all options into single AAPBRecordsBlock * Improves docstrings * Better labels and icons for blocks
- Loading branch information
Showing
3 changed files
with
316 additions
and
57 deletions.
There are no files selected for viewing
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
284 changes: 284 additions & 0 deletions
284
ov_collections/migrations/0012_remove_collection_aapb_records_and_more.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,284 @@ | ||
# Generated by Django 4.2.8 on 2023-12-20 19:08 | ||
|
||
from django.db import migrations | ||
import wagtail.blocks | ||
import wagtail.fields | ||
import wagtail.images.blocks | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("ov_collections", "0011_alter_collection_aapb_records_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name="collection", | ||
name="aapb_records", | ||
), | ||
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.TextBlock()), | ||
("image", wagtail.images.blocks.ImageChooserBlock()), | ||
("html", wagtail.blocks.RawHTMLBlock(label="HTML")), | ||
], | ||
use_json_field=True, | ||
), | ||
), | ||
] |
Oops, something went wrong.