0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

format migration files - black

This commit is contained in:
LB Johnston 2022-03-30 07:34:13 +10:00 committed by Matt Westcott
parent f1dcf407e3
commit 316bbf9508
2 changed files with 187 additions and 50 deletions

View File

@ -11,73 +11,156 @@ import wagtail.test.testapp.models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('tests', '0061_tag_fk_for_django_4'), ("tests", "0061_tag_fk_for_django_4"),
] ]
operations = [ operations = [
migrations.AlterField( migrations.AlterField(
model_name='addedstreamfieldwithemptylistdefaultpage', model_name="addedstreamfieldwithemptylistdefaultpage",
name='body', name="body",
field=wagtail.fields.StreamField([('title', wagtail.blocks.CharBlock())], default=[], use_json_field=False), field=wagtail.fields.StreamField(
[("title", wagtail.blocks.CharBlock())],
default=[],
use_json_field=False,
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='addedstreamfieldwithemptystringdefaultpage', model_name="addedstreamfieldwithemptystringdefaultpage",
name='body', name="body",
field=wagtail.fields.StreamField([('title', wagtail.blocks.CharBlock())], default='', use_json_field=False), field=wagtail.fields.StreamField(
[("title", wagtail.blocks.CharBlock())],
default="",
use_json_field=False,
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='addedstreamfieldwithoutdefaultpage', model_name="addedstreamfieldwithoutdefaultpage",
name='body', name="body",
field=wagtail.fields.StreamField([('title', wagtail.blocks.CharBlock())], use_json_field=False), field=wagtail.fields.StreamField(
[("title", wagtail.blocks.CharBlock())], use_json_field=False
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='blockcountsstreammodel', model_name="blockcountsstreammodel",
name='body', name="body",
field=wagtail.fields.StreamField([('text', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], use_json_field=False), field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.CharBlock()),
("rich_text", wagtail.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
],
use_json_field=False,
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='customrichblockfieldpage', model_name="customrichblockfieldpage",
name='body', name="body",
field=wagtail.fields.StreamField([('rich_text', wagtail.blocks.RichTextBlock(editor='custom'))], use_json_field=False), field=wagtail.fields.StreamField(
[("rich_text", wagtail.blocks.RichTextBlock(editor="custom"))],
use_json_field=False,
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='deadlystreampage', model_name="deadlystreampage",
name='body', name="body",
field=wagtail.fields.StreamField([('title', wagtail.test.testapp.models.DeadlyCharBlock())], use_json_field=False), field=wagtail.fields.StreamField(
[("title", wagtail.test.testapp.models.DeadlyCharBlock())],
use_json_field=False,
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='defaultrichblockfieldpage', model_name="defaultrichblockfieldpage",
name='body', name="body",
field=wagtail.fields.StreamField([('rich_text', wagtail.blocks.RichTextBlock())], use_json_field=False), field=wagtail.fields.StreamField(
[("rich_text", wagtail.blocks.RichTextBlock())], use_json_field=False
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='defaultstreampage', model_name="defaultstreampage",
name='body', name="body",
field=wagtail.fields.StreamField([('text', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], default='', use_json_field=False), field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.CharBlock()),
("rich_text", wagtail.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
],
default="",
use_json_field=False,
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='inlinestreampagesection', model_name="inlinestreampagesection",
name='body', name="body",
field=wagtail.fields.StreamField([('text', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], use_json_field=False), field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.CharBlock()),
("rich_text", wagtail.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
],
use_json_field=False,
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='minmaxcountstreammodel', model_name="minmaxcountstreammodel",
name='body', name="body",
field=wagtail.fields.StreamField([('text', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], use_json_field=False), field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.CharBlock()),
("rich_text", wagtail.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
],
use_json_field=False,
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='streammodel', model_name="streammodel",
name='body', name="body",
field=wagtail.fields.StreamField([('text', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], use_json_field=False), field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.CharBlock()),
("rich_text", wagtail.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
],
use_json_field=False,
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='streampage', model_name="streampage",
name='body', name="body",
field=wagtail.fields.StreamField([('text', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('image', wagtail.test.testapp.models.ExtendedImageChooserBlock()), ('product', wagtail.blocks.StructBlock([('name', wagtail.blocks.CharBlock()), ('price', wagtail.blocks.CharBlock())])), ('raw_html', wagtail.blocks.RawHTMLBlock()), ('books', wagtail.blocks.StreamBlock([('title', wagtail.blocks.CharBlock()), ('author', wagtail.blocks.CharBlock())]))], use_json_field=False), field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.CharBlock()),
("rich_text", wagtail.blocks.RichTextBlock()),
("image", wagtail.test.testapp.models.ExtendedImageChooserBlock()),
(
"product",
wagtail.blocks.StructBlock(
[
("name", wagtail.blocks.CharBlock()),
("price", wagtail.blocks.CharBlock()),
]
),
),
("raw_html", wagtail.blocks.RawHTMLBlock()),
(
"books",
wagtail.blocks.StreamBlock(
[
("title", wagtail.blocks.CharBlock()),
("author", wagtail.blocks.CharBlock()),
]
),
),
],
use_json_field=False,
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='tableblockstreampage', model_name="tableblockstreampage",
name='table', name="table",
field=wagtail.fields.StreamField([('table', wagtail.contrib.table_block.blocks.TableBlock())], use_json_field=False), field=wagtail.fields.StreamField(
[("table", wagtail.contrib.table_block.blocks.TableBlock())],
use_json_field=False,
),
), ),
] ]

View File

@ -9,29 +9,83 @@ import wagtail.images.blocks
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('tests', '0062_alter_addedstreamfieldwithemptylistdefaultpage_body_and_more'), ("tests", "0062_alter_addedstreamfieldwithemptylistdefaultpage_body_and_more"),
] ]
operations = [ operations = [
migrations.CreateModel( migrations.CreateModel(
name='JSONBlockCountsStreamModel', name="JSONBlockCountsStreamModel",
fields=[ fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), (
('body', wagtail.fields.StreamField([('text', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], use_json_field=True)), "id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"body",
wagtail.fields.StreamField(
[
("text", wagtail.blocks.CharBlock()),
("rich_text", wagtail.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
],
use_json_field=True,
),
),
], ],
), ),
migrations.CreateModel( migrations.CreateModel(
name='JSONMinMaxCountStreamModel', name="JSONMinMaxCountStreamModel",
fields=[ fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), (
('body', wagtail.fields.StreamField([('text', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], use_json_field=True)), "id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"body",
wagtail.fields.StreamField(
[
("text", wagtail.blocks.CharBlock()),
("rich_text", wagtail.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
],
use_json_field=True,
),
),
], ],
), ),
migrations.CreateModel( migrations.CreateModel(
name='JSONStreamModel', name="JSONStreamModel",
fields=[ fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), (
('body', wagtail.fields.StreamField([('text', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], use_json_field=True)), "id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"body",
wagtail.fields.StreamField(
[
("text", wagtail.blocks.CharBlock()),
("rich_text", wagtail.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
],
use_json_field=True,
),
),
], ],
), ),
] ]