-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add precom remove migrations * fix migrations
- Loading branch information
1 parent
dbb1195
commit 12914f5
Showing
6 changed files
with
655 additions
and
2 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
304 changes: 304 additions & 0 deletions
304
home/migrations/0028_alter_generalpage_content_vert_image_card.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,304 @@ | ||
# Generated by Django 4.1.13 on 2024-04-03 21:30 | ||
from __future__ import annotations | ||
|
||
import wagtail.blocks | ||
import wagtail.fields | ||
import wagtail.images.blocks | ||
from django.db import migrations | ||
|
||
import home.blocks | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("home", "0027_alter_generalpage_content_optional_fields"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="generalpage", | ||
name="content", | ||
field=wagtail.fields.StreamField( | ||
[ | ||
( | ||
"heading", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"size", | ||
wagtail.blocks.ChoiceBlock( | ||
choices=[ | ||
("text-5xl", "h1"), | ||
("text-4xl", "h2"), | ||
("text-3xl", "h3"), | ||
("text-2xl", "h4"), | ||
("text-xl", "h5"), | ||
("text-lg", "h6"), | ||
], | ||
icon="title", | ||
), | ||
), | ||
( | ||
"heading", | ||
wagtail.blocks.CharBlock( | ||
class_name="heading-blog", max_length=255 | ||
), | ||
), | ||
], | ||
icon="h1", | ||
label="Heading", | ||
), | ||
), | ||
( | ||
"rich_text", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"text", | ||
wagtail.blocks.RichTextBlock( | ||
features=[ | ||
"embed", | ||
"bold", | ||
"italic", | ||
"link", | ||
"superscript", | ||
"subscript", | ||
"strikethrough", | ||
"code", | ||
"hr", | ||
], | ||
icon="title", | ||
label="Rich Text", | ||
max_length=10000, | ||
), | ||
) | ||
] | ||
), | ||
), | ||
( | ||
"list", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"size", | ||
wagtail.blocks.ChoiceBlock( | ||
choices=[ | ||
("circle", "unordered list"), | ||
("decimal", "ordered list"), | ||
("none", "unstyled"), | ||
] | ||
), | ||
), | ||
( | ||
"text", | ||
wagtail.blocks.RichTextBlock( | ||
features=["ul"], icon="list-ol" | ||
), | ||
), | ||
], | ||
icon="list-ol", | ||
label="List", | ||
), | ||
), | ||
("paragraph", wagtail.blocks.TextBlock(max_length=10000)), | ||
( | ||
"html", | ||
wagtail.blocks.RawHTMLBlock(icon="code", label="Raw HTML"), | ||
), | ||
("image", wagtail.images.blocks.ImageChooserBlock()), | ||
( | ||
"caption", | ||
wagtail.blocks.StructBlock( | ||
[("text", wagtail.blocks.TextBlock())] | ||
), | ||
), | ||
( | ||
"text_with_heading", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"heading", | ||
wagtail.blocks.CharBlock( | ||
class_name="heading-blog", max_length=255 | ||
), | ||
), | ||
("text", wagtail.blocks.TextBlock()), | ||
] | ||
), | ||
), | ||
( | ||
"text_with_heading_and_image", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"heading", | ||
wagtail.blocks.CharBlock( | ||
max_length=255, required=False | ||
), | ||
), | ||
("text", wagtail.blocks.TextBlock(required=False)), | ||
("image", wagtail.images.blocks.ImageChooserBlock()), | ||
] | ||
), | ||
), | ||
( | ||
"text_with_heading_and_right_image", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"heading", | ||
wagtail.blocks.CharBlock( | ||
class_name="heading-blog", | ||
max_length=255, | ||
required=False, | ||
), | ||
), | ||
("text", wagtail.blocks.TextBlock()), | ||
("image", wagtail.images.blocks.ImageChooserBlock()), | ||
] | ||
), | ||
), | ||
( | ||
"text_with_heading_and_left_image", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"heading", | ||
wagtail.blocks.CharBlock( | ||
class_name="blog", | ||
max_length=255, | ||
required=False, | ||
), | ||
), | ||
("text", wagtail.blocks.TextBlock()), | ||
("image", wagtail.images.blocks.ImageChooserBlock()), | ||
] | ||
), | ||
), | ||
( | ||
"left_quote_right_image", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
("quote", wagtail.blocks.TextBlock()), | ||
("byline", wagtail.blocks.CharBlock(max_length=255)), | ||
("image", wagtail.images.blocks.ImageChooserBlock()), | ||
], | ||
icon="openquote", | ||
), | ||
), | ||
( | ||
"video_embed", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
("heading", wagtail.blocks.CharBlock(max_length=255)), | ||
("text", wagtail.blocks.TextBlock()), | ||
] | ||
), | ||
), | ||
("table", home.blocks.CustomTableBlock()), | ||
( | ||
"code_block", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"language", | ||
wagtail.blocks.ChoiceBlock( | ||
choices=[ | ||
("Python", "python"), | ||
("Markup", "html"), | ||
("CSS", "css"), | ||
("Clojure", "clojure"), | ||
("Bash", "shell"), | ||
("Django", "django"), | ||
("Jinja2", "jinja2"), | ||
("Docker", "dockerfile"), | ||
("Git", "git"), | ||
("GraphQL", "graphql"), | ||
("Handlebars", "handlebars"), | ||
(".ignore", "gitignore"), | ||
("JSON", "json"), | ||
("JSON5", "json5"), | ||
("Markdown", "md"), | ||
("Markdown", "md"), | ||
("React JSX", "jsx"), | ||
("React TSX", "tsx"), | ||
("SASS", "sass"), | ||
("SCSS", "scss"), | ||
("TypeScript", "ts"), | ||
("vim", "vim"), | ||
] | ||
), | ||
), | ||
( | ||
"caption", | ||
wagtail.blocks.CharBlock( | ||
blank=True, max_length=255 | ||
), | ||
), | ||
( | ||
"page", | ||
wagtail.blocks.CharBlock( | ||
blank=True, max_length=255 | ||
), | ||
), | ||
( | ||
"code", | ||
wagtail.blocks.TextBlock( | ||
blank=True, max_length=1000 | ||
), | ||
), | ||
] | ||
), | ||
), | ||
( | ||
"vertical_image_cards", | ||
wagtail.blocks.StreamBlock( | ||
[ | ||
( | ||
"images", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"image", | ||
wagtail.images.blocks.ImageChooserBlock( | ||
help_text="size: 800X450px", | ||
required=True, | ||
), | ||
), | ||
( | ||
"caption", | ||
wagtail.blocks.StructBlock( | ||
[ | ||
( | ||
"text", | ||
wagtail.blocks.TextBlock(), | ||
) | ||
] | ||
), | ||
), | ||
( | ||
"description", | ||
wagtail.blocks.CharBlock( | ||
help_text="300 characters limit", | ||
max_length=300, | ||
required=False, | ||
), | ||
), | ||
( | ||
"link", | ||
wagtail.blocks.URLBlock(required=False), | ||
), | ||
] | ||
), | ||
) | ||
] | ||
), | ||
), | ||
], | ||
blank=True, | ||
null=True, | ||
use_json_field=True, | ||
verbose_name="StreamField Body", | ||
), | ||
), | ||
] |
Oops, something went wrong.