Don't require code header
This commit is contained in:
parent
ffcb17de31
commit
71f74251bb
6 changed files with 1179 additions and 1 deletions
|
@ -0,0 +1,608 @@
|
|||
# Generated by Django 4.0.6 on 2022-09-06 07:57
|
||||
|
||||
import wagtail.blocks
|
||||
import wagtail.contrib.typed_table_block.blocks
|
||||
import wagtail.embeds.blocks
|
||||
import wagtail.fields
|
||||
import wagtail.images.blocks
|
||||
from django.db import migrations
|
||||
|
||||
import website.contrib.code_block.blocks
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("blog", "0001_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="blogpostcollectionlistpage",
|
||||
name="body",
|
||||
field=wagtail.fields.StreamField(
|
||||
[
|
||||
("embed", wagtail.embeds.blocks.EmbedBlock()),
|
||||
("rich_text", wagtail.blocks.RichTextBlock()),
|
||||
(
|
||||
"lorem",
|
||||
wagtail.blocks.StructBlock(
|
||||
[("paragraphs", wagtail.blocks.IntegerBlock(min_value=1))]
|
||||
),
|
||||
),
|
||||
("html", wagtail.blocks.RawHTMLBlock()),
|
||||
(
|
||||
"image",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("image", wagtail.images.blocks.ImageChooserBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"code",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
(
|
||||
"filename",
|
||||
wagtail.blocks.CharBlock(
|
||||
max_length=128, required=False
|
||||
),
|
||||
),
|
||||
(
|
||||
"language",
|
||||
wagtail.blocks.ChoiceBlock(
|
||||
choices=website.contrib.code_block.blocks.get_language_choices
|
||||
),
|
||||
),
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"always_show_header",
|
||||
wagtail.blocks.BooleanBlock(
|
||||
default=False, required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"tangent",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("name", wagtail.blocks.CharBlock(max_length=64)),
|
||||
(
|
||||
"content",
|
||||
wagtail.blocks.RichTextBlock(editor="simple"),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"mermaid",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"table",
|
||||
wagtail.contrib.typed_table_block.blocks.TypedTableBlock(
|
||||
[
|
||||
(
|
||||
"rich_text",
|
||||
wagtail.blocks.RichTextBlock(editor="plain"),
|
||||
),
|
||||
("numeric", wagtail.blocks.FloatBlock()),
|
||||
("text", wagtail.blocks.CharBlock()),
|
||||
]
|
||||
),
|
||||
),
|
||||
],
|
||||
blank=True,
|
||||
use_json_field=True,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="blogpostcollectionpage",
|
||||
name="body",
|
||||
field=wagtail.fields.StreamField(
|
||||
[
|
||||
("embed", wagtail.embeds.blocks.EmbedBlock()),
|
||||
("rich_text", wagtail.blocks.RichTextBlock()),
|
||||
(
|
||||
"lorem",
|
||||
wagtail.blocks.StructBlock(
|
||||
[("paragraphs", wagtail.blocks.IntegerBlock(min_value=1))]
|
||||
),
|
||||
),
|
||||
("html", wagtail.blocks.RawHTMLBlock()),
|
||||
(
|
||||
"image",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("image", wagtail.images.blocks.ImageChooserBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"code",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
(
|
||||
"filename",
|
||||
wagtail.blocks.CharBlock(
|
||||
max_length=128, required=False
|
||||
),
|
||||
),
|
||||
(
|
||||
"language",
|
||||
wagtail.blocks.ChoiceBlock(
|
||||
choices=website.contrib.code_block.blocks.get_language_choices
|
||||
),
|
||||
),
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"always_show_header",
|
||||
wagtail.blocks.BooleanBlock(
|
||||
default=False, required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"tangent",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("name", wagtail.blocks.CharBlock(max_length=64)),
|
||||
(
|
||||
"content",
|
||||
wagtail.blocks.RichTextBlock(editor="simple"),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"mermaid",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"table",
|
||||
wagtail.contrib.typed_table_block.blocks.TypedTableBlock(
|
||||
[
|
||||
(
|
||||
"rich_text",
|
||||
wagtail.blocks.RichTextBlock(editor="plain"),
|
||||
),
|
||||
("numeric", wagtail.blocks.FloatBlock()),
|
||||
("text", wagtail.blocks.CharBlock()),
|
||||
]
|
||||
),
|
||||
),
|
||||
],
|
||||
blank=True,
|
||||
use_json_field=True,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="blogpostlistpage",
|
||||
name="body",
|
||||
field=wagtail.fields.StreamField(
|
||||
[
|
||||
("embed", wagtail.embeds.blocks.EmbedBlock()),
|
||||
("rich_text", wagtail.blocks.RichTextBlock()),
|
||||
(
|
||||
"lorem",
|
||||
wagtail.blocks.StructBlock(
|
||||
[("paragraphs", wagtail.blocks.IntegerBlock(min_value=1))]
|
||||
),
|
||||
),
|
||||
("html", wagtail.blocks.RawHTMLBlock()),
|
||||
(
|
||||
"image",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("image", wagtail.images.blocks.ImageChooserBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"code",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
(
|
||||
"filename",
|
||||
wagtail.blocks.CharBlock(
|
||||
max_length=128, required=False
|
||||
),
|
||||
),
|
||||
(
|
||||
"language",
|
||||
wagtail.blocks.ChoiceBlock(
|
||||
choices=website.contrib.code_block.blocks.get_language_choices
|
||||
),
|
||||
),
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"always_show_header",
|
||||
wagtail.blocks.BooleanBlock(
|
||||
default=False, required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"tangent",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("name", wagtail.blocks.CharBlock(max_length=64)),
|
||||
(
|
||||
"content",
|
||||
wagtail.blocks.RichTextBlock(editor="simple"),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"mermaid",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"table",
|
||||
wagtail.contrib.typed_table_block.blocks.TypedTableBlock(
|
||||
[
|
||||
(
|
||||
"rich_text",
|
||||
wagtail.blocks.RichTextBlock(editor="plain"),
|
||||
),
|
||||
("numeric", wagtail.blocks.FloatBlock()),
|
||||
("text", wagtail.blocks.CharBlock()),
|
||||
]
|
||||
),
|
||||
),
|
||||
],
|
||||
blank=True,
|
||||
use_json_field=True,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="blogpostpage",
|
||||
name="body",
|
||||
field=wagtail.fields.StreamField(
|
||||
[
|
||||
("embed", wagtail.embeds.blocks.EmbedBlock()),
|
||||
("rich_text", wagtail.blocks.RichTextBlock()),
|
||||
(
|
||||
"lorem",
|
||||
wagtail.blocks.StructBlock(
|
||||
[("paragraphs", wagtail.blocks.IntegerBlock(min_value=1))]
|
||||
),
|
||||
),
|
||||
("html", wagtail.blocks.RawHTMLBlock()),
|
||||
(
|
||||
"image",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("image", wagtail.images.blocks.ImageChooserBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"code",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
(
|
||||
"filename",
|
||||
wagtail.blocks.CharBlock(
|
||||
max_length=128, required=False
|
||||
),
|
||||
),
|
||||
(
|
||||
"language",
|
||||
wagtail.blocks.ChoiceBlock(
|
||||
choices=website.contrib.code_block.blocks.get_language_choices
|
||||
),
|
||||
),
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"always_show_header",
|
||||
wagtail.blocks.BooleanBlock(
|
||||
default=False, required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"tangent",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("name", wagtail.blocks.CharBlock(max_length=64)),
|
||||
(
|
||||
"content",
|
||||
wagtail.blocks.RichTextBlock(editor="simple"),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"mermaid",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"table",
|
||||
wagtail.contrib.typed_table_block.blocks.TypedTableBlock(
|
||||
[
|
||||
(
|
||||
"rich_text",
|
||||
wagtail.blocks.RichTextBlock(editor="plain"),
|
||||
),
|
||||
("numeric", wagtail.blocks.FloatBlock()),
|
||||
("text", wagtail.blocks.CharBlock()),
|
||||
]
|
||||
),
|
||||
),
|
||||
],
|
||||
blank=True,
|
||||
use_json_field=True,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="blogposttaglistpage",
|
||||
name="body",
|
||||
field=wagtail.fields.StreamField(
|
||||
[
|
||||
("embed", wagtail.embeds.blocks.EmbedBlock()),
|
||||
("rich_text", wagtail.blocks.RichTextBlock()),
|
||||
(
|
||||
"lorem",
|
||||
wagtail.blocks.StructBlock(
|
||||
[("paragraphs", wagtail.blocks.IntegerBlock(min_value=1))]
|
||||
),
|
||||
),
|
||||
("html", wagtail.blocks.RawHTMLBlock()),
|
||||
(
|
||||
"image",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("image", wagtail.images.blocks.ImageChooserBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"code",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
(
|
||||
"filename",
|
||||
wagtail.blocks.CharBlock(
|
||||
max_length=128, required=False
|
||||
),
|
||||
),
|
||||
(
|
||||
"language",
|
||||
wagtail.blocks.ChoiceBlock(
|
||||
choices=website.contrib.code_block.blocks.get_language_choices
|
||||
),
|
||||
),
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"always_show_header",
|
||||
wagtail.blocks.BooleanBlock(
|
||||
default=False, required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"tangent",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("name", wagtail.blocks.CharBlock(max_length=64)),
|
||||
(
|
||||
"content",
|
||||
wagtail.blocks.RichTextBlock(editor="simple"),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"mermaid",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"table",
|
||||
wagtail.contrib.typed_table_block.blocks.TypedTableBlock(
|
||||
[
|
||||
(
|
||||
"rich_text",
|
||||
wagtail.blocks.RichTextBlock(editor="plain"),
|
||||
),
|
||||
("numeric", wagtail.blocks.FloatBlock()),
|
||||
("text", wagtail.blocks.CharBlock()),
|
||||
]
|
||||
),
|
||||
),
|
||||
],
|
||||
blank=True,
|
||||
use_json_field=True,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="blogposttagpage",
|
||||
name="body",
|
||||
field=wagtail.fields.StreamField(
|
||||
[
|
||||
("embed", wagtail.embeds.blocks.EmbedBlock()),
|
||||
("rich_text", wagtail.blocks.RichTextBlock()),
|
||||
(
|
||||
"lorem",
|
||||
wagtail.blocks.StructBlock(
|
||||
[("paragraphs", wagtail.blocks.IntegerBlock(min_value=1))]
|
||||
),
|
||||
),
|
||||
("html", wagtail.blocks.RawHTMLBlock()),
|
||||
(
|
||||
"image",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("image", wagtail.images.blocks.ImageChooserBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"code",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
(
|
||||
"filename",
|
||||
wagtail.blocks.CharBlock(
|
||||
max_length=128, required=False
|
||||
),
|
||||
),
|
||||
(
|
||||
"language",
|
||||
wagtail.blocks.ChoiceBlock(
|
||||
choices=website.contrib.code_block.blocks.get_language_choices
|
||||
),
|
||||
),
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"always_show_header",
|
||||
wagtail.blocks.BooleanBlock(
|
||||
default=False, required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"tangent",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("name", wagtail.blocks.CharBlock(max_length=64)),
|
||||
(
|
||||
"content",
|
||||
wagtail.blocks.RichTextBlock(editor="simple"),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"mermaid",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"table",
|
||||
wagtail.contrib.typed_table_block.blocks.TypedTableBlock(
|
||||
[
|
||||
(
|
||||
"rich_text",
|
||||
wagtail.blocks.RichTextBlock(editor="plain"),
|
||||
),
|
||||
("numeric", wagtail.blocks.FloatBlock()),
|
||||
("text", wagtail.blocks.CharBlock()),
|
||||
]
|
||||
),
|
||||
),
|
||||
],
|
||||
blank=True,
|
||||
use_json_field=True,
|
||||
),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,216 @@
|
|||
# Generated by Django 4.0.6 on 2022-09-06 07:57
|
||||
|
||||
import wagtail.blocks
|
||||
import wagtail.contrib.typed_table_block.blocks
|
||||
import wagtail.embeds.blocks
|
||||
import wagtail.fields
|
||||
import wagtail.images.blocks
|
||||
from django.db import migrations
|
||||
|
||||
import website.contrib.code_block.blocks
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("common", "0001_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="contentpage",
|
||||
name="body",
|
||||
field=wagtail.fields.StreamField(
|
||||
[
|
||||
("embed", wagtail.embeds.blocks.EmbedBlock()),
|
||||
("rich_text", wagtail.blocks.RichTextBlock()),
|
||||
(
|
||||
"lorem",
|
||||
wagtail.blocks.StructBlock(
|
||||
[("paragraphs", wagtail.blocks.IntegerBlock(min_value=1))]
|
||||
),
|
||||
),
|
||||
("html", wagtail.blocks.RawHTMLBlock()),
|
||||
(
|
||||
"image",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("image", wagtail.images.blocks.ImageChooserBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"code",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
(
|
||||
"filename",
|
||||
wagtail.blocks.CharBlock(
|
||||
max_length=128, required=False
|
||||
),
|
||||
),
|
||||
(
|
||||
"language",
|
||||
wagtail.blocks.ChoiceBlock(
|
||||
choices=website.contrib.code_block.blocks.get_language_choices
|
||||
),
|
||||
),
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"always_show_header",
|
||||
wagtail.blocks.BooleanBlock(
|
||||
default=False, required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"tangent",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("name", wagtail.blocks.CharBlock(max_length=64)),
|
||||
(
|
||||
"content",
|
||||
wagtail.blocks.RichTextBlock(editor="simple"),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"mermaid",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"table",
|
||||
wagtail.contrib.typed_table_block.blocks.TypedTableBlock(
|
||||
[
|
||||
(
|
||||
"rich_text",
|
||||
wagtail.blocks.RichTextBlock(editor="plain"),
|
||||
),
|
||||
("numeric", wagtail.blocks.FloatBlock()),
|
||||
("text", wagtail.blocks.CharBlock()),
|
||||
]
|
||||
),
|
||||
),
|
||||
],
|
||||
blank=True,
|
||||
use_json_field=True,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="listingpage",
|
||||
name="body",
|
||||
field=wagtail.fields.StreamField(
|
||||
[
|
||||
("embed", wagtail.embeds.blocks.EmbedBlock()),
|
||||
("rich_text", wagtail.blocks.RichTextBlock()),
|
||||
(
|
||||
"lorem",
|
||||
wagtail.blocks.StructBlock(
|
||||
[("paragraphs", wagtail.blocks.IntegerBlock(min_value=1))]
|
||||
),
|
||||
),
|
||||
("html", wagtail.blocks.RawHTMLBlock()),
|
||||
(
|
||||
"image",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("image", wagtail.images.blocks.ImageChooserBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"code",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
(
|
||||
"filename",
|
||||
wagtail.blocks.CharBlock(
|
||||
max_length=128, required=False
|
||||
),
|
||||
),
|
||||
(
|
||||
"language",
|
||||
wagtail.blocks.ChoiceBlock(
|
||||
choices=website.contrib.code_block.blocks.get_language_choices
|
||||
),
|
||||
),
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"always_show_header",
|
||||
wagtail.blocks.BooleanBlock(
|
||||
default=False, required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"tangent",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("name", wagtail.blocks.CharBlock(max_length=64)),
|
||||
(
|
||||
"content",
|
||||
wagtail.blocks.RichTextBlock(editor="simple"),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"mermaid",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"table",
|
||||
wagtail.contrib.typed_table_block.blocks.TypedTableBlock(
|
||||
[
|
||||
(
|
||||
"rich_text",
|
||||
wagtail.blocks.RichTextBlock(editor="plain"),
|
||||
),
|
||||
("numeric", wagtail.blocks.FloatBlock()),
|
||||
("text", wagtail.blocks.CharBlock()),
|
||||
]
|
||||
),
|
||||
),
|
||||
],
|
||||
blank=True,
|
||||
use_json_field=True,
|
||||
),
|
||||
),
|
||||
]
|
118
website/contact/migrations/0002_alter_contactpage_body.py
Normal file
118
website/contact/migrations/0002_alter_contactpage_body.py
Normal file
|
@ -0,0 +1,118 @@
|
|||
# Generated by Django 4.0.6 on 2022-09-06 07:57
|
||||
|
||||
import wagtail.blocks
|
||||
import wagtail.contrib.typed_table_block.blocks
|
||||
import wagtail.embeds.blocks
|
||||
import wagtail.fields
|
||||
import wagtail.images.blocks
|
||||
from django.db import migrations
|
||||
|
||||
import website.contrib.code_block.blocks
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("contact", "0001_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="contactpage",
|
||||
name="body",
|
||||
field=wagtail.fields.StreamField(
|
||||
[
|
||||
("embed", wagtail.embeds.blocks.EmbedBlock()),
|
||||
("rich_text", wagtail.blocks.RichTextBlock()),
|
||||
(
|
||||
"lorem",
|
||||
wagtail.blocks.StructBlock(
|
||||
[("paragraphs", wagtail.blocks.IntegerBlock(min_value=1))]
|
||||
),
|
||||
),
|
||||
("html", wagtail.blocks.RawHTMLBlock()),
|
||||
(
|
||||
"image",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("image", wagtail.images.blocks.ImageChooserBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"code",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
(
|
||||
"filename",
|
||||
wagtail.blocks.CharBlock(
|
||||
max_length=128, required=False
|
||||
),
|
||||
),
|
||||
(
|
||||
"language",
|
||||
wagtail.blocks.ChoiceBlock(
|
||||
choices=website.contrib.code_block.blocks.get_language_choices
|
||||
),
|
||||
),
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"always_show_header",
|
||||
wagtail.blocks.BooleanBlock(
|
||||
default=False, required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"tangent",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("name", wagtail.blocks.CharBlock(max_length=64)),
|
||||
(
|
||||
"content",
|
||||
wagtail.blocks.RichTextBlock(editor="simple"),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"mermaid",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"table",
|
||||
wagtail.contrib.typed_table_block.blocks.TypedTableBlock(
|
||||
[
|
||||
(
|
||||
"rich_text",
|
||||
wagtail.blocks.RichTextBlock(editor="plain"),
|
||||
),
|
||||
("numeric", wagtail.blocks.FloatBlock()),
|
||||
("text", wagtail.blocks.CharBlock()),
|
||||
]
|
||||
),
|
||||
),
|
||||
],
|
||||
blank=True,
|
||||
use_json_field=True,
|
||||
),
|
||||
),
|
||||
]
|
|
@ -34,7 +34,7 @@ class CodeBlock(StructBlock):
|
|||
choices=get_language_choices,
|
||||
)
|
||||
source = TextBlock()
|
||||
always_show_header = BooleanBlock(default=False)
|
||||
always_show_header = BooleanBlock(default=False, required=False)
|
||||
|
||||
class Meta:
|
||||
icon = "code"
|
||||
|
|
118
website/search/migrations/0002_alter_searchpage_body.py
Normal file
118
website/search/migrations/0002_alter_searchpage_body.py
Normal file
|
@ -0,0 +1,118 @@
|
|||
# Generated by Django 4.0.6 on 2022-09-06 07:57
|
||||
|
||||
import wagtail.blocks
|
||||
import wagtail.contrib.typed_table_block.blocks
|
||||
import wagtail.embeds.blocks
|
||||
import wagtail.fields
|
||||
import wagtail.images.blocks
|
||||
from django.db import migrations
|
||||
|
||||
import website.contrib.code_block.blocks
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("search", "0001_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="searchpage",
|
||||
name="body",
|
||||
field=wagtail.fields.StreamField(
|
||||
[
|
||||
("embed", wagtail.embeds.blocks.EmbedBlock()),
|
||||
("rich_text", wagtail.blocks.RichTextBlock()),
|
||||
(
|
||||
"lorem",
|
||||
wagtail.blocks.StructBlock(
|
||||
[("paragraphs", wagtail.blocks.IntegerBlock(min_value=1))]
|
||||
),
|
||||
),
|
||||
("html", wagtail.blocks.RawHTMLBlock()),
|
||||
(
|
||||
"image",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("image", wagtail.images.blocks.ImageChooserBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"code",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
(
|
||||
"filename",
|
||||
wagtail.blocks.CharBlock(
|
||||
max_length=128, required=False
|
||||
),
|
||||
),
|
||||
(
|
||||
"language",
|
||||
wagtail.blocks.ChoiceBlock(
|
||||
choices=website.contrib.code_block.blocks.get_language_choices
|
||||
),
|
||||
),
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"always_show_header",
|
||||
wagtail.blocks.BooleanBlock(
|
||||
default=False, required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"tangent",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("name", wagtail.blocks.CharBlock(max_length=64)),
|
||||
(
|
||||
"content",
|
||||
wagtail.blocks.RichTextBlock(editor="simple"),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"mermaid",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"table",
|
||||
wagtail.contrib.typed_table_block.blocks.TypedTableBlock(
|
||||
[
|
||||
(
|
||||
"rich_text",
|
||||
wagtail.blocks.RichTextBlock(editor="plain"),
|
||||
),
|
||||
("numeric", wagtail.blocks.FloatBlock()),
|
||||
("text", wagtail.blocks.CharBlock()),
|
||||
]
|
||||
),
|
||||
),
|
||||
],
|
||||
blank=True,
|
||||
use_json_field=True,
|
||||
),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,118 @@
|
|||
# Generated by Django 4.0.6 on 2022-09-06 07:57
|
||||
|
||||
import wagtail.blocks
|
||||
import wagtail.contrib.typed_table_block.blocks
|
||||
import wagtail.embeds.blocks
|
||||
import wagtail.fields
|
||||
import wagtail.images.blocks
|
||||
from django.db import migrations
|
||||
|
||||
import website.contrib.code_block.blocks
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("spotify", "0001_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="spotifyplaylistpage",
|
||||
name="body",
|
||||
field=wagtail.fields.StreamField(
|
||||
[
|
||||
("embed", wagtail.embeds.blocks.EmbedBlock()),
|
||||
("rich_text", wagtail.blocks.RichTextBlock()),
|
||||
(
|
||||
"lorem",
|
||||
wagtail.blocks.StructBlock(
|
||||
[("paragraphs", wagtail.blocks.IntegerBlock(min_value=1))]
|
||||
),
|
||||
),
|
||||
("html", wagtail.blocks.RawHTMLBlock()),
|
||||
(
|
||||
"image",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("image", wagtail.images.blocks.ImageChooserBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"code",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
(
|
||||
"filename",
|
||||
wagtail.blocks.CharBlock(
|
||||
max_length=128, required=False
|
||||
),
|
||||
),
|
||||
(
|
||||
"language",
|
||||
wagtail.blocks.ChoiceBlock(
|
||||
choices=website.contrib.code_block.blocks.get_language_choices
|
||||
),
|
||||
),
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"always_show_header",
|
||||
wagtail.blocks.BooleanBlock(
|
||||
default=False, required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"tangent",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("name", wagtail.blocks.CharBlock(max_length=64)),
|
||||
(
|
||||
"content",
|
||||
wagtail.blocks.RichTextBlock(editor="simple"),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"mermaid",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("source", wagtail.blocks.TextBlock()),
|
||||
(
|
||||
"caption",
|
||||
wagtail.blocks.RichTextBlock(
|
||||
editor="plain", required=False
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
"table",
|
||||
wagtail.contrib.typed_table_block.blocks.TypedTableBlock(
|
||||
[
|
||||
(
|
||||
"rich_text",
|
||||
wagtail.blocks.RichTextBlock(editor="plain"),
|
||||
),
|
||||
("numeric", wagtail.blocks.FloatBlock()),
|
||||
("text", wagtail.blocks.CharBlock()),
|
||||
]
|
||||
),
|
||||
),
|
||||
],
|
||||
blank=True,
|
||||
use_json_field=True,
|
||||
),
|
||||
),
|
||||
]
|
Loading…
Reference in a new issue