From 0c31f838f2b61cd26ef177c41f027b1a0e770993 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Wed, 15 Aug 2018 18:45:20 +0200 Subject: [PATCH] Change variable names in content blocks --- .../migrations/0003_auto_20180815_1349.py | 21 +++++++++++++++++++ .../migrations/0004_auto_20180815_1629.py | 21 +++++++++++++++++++ server/book/models/contentblock.py | 4 ++-- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 server/book/migrations/0003_auto_20180815_1349.py create mode 100644 server/book/migrations/0004_auto_20180815_1629.py diff --git a/server/book/migrations/0003_auto_20180815_1349.py b/server/book/migrations/0003_auto_20180815_1349.py new file mode 100644 index 00000000..d4960603 --- /dev/null +++ b/server/book/migrations/0003_auto_20180815_1349.py @@ -0,0 +1,21 @@ +# Generated by Django 2.0.6 on 2018-08-15 13:49 + +from django.db import migrations +import wagtail.core.blocks +import wagtail.core.fields +import wagtail.images.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('book', '0002_contentblock'), + ] + + operations = [ + migrations.AlterField( + model_name='contentblock', + name='contents', + field=wagtail.core.fields.StreamField([('text_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())], icon='doc-full')), ('modal_text', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.RichTextBlock()), ('modal_content', wagtail.core.blocks.RichTextBlock())], icon='placeholder')), ('student_entry', wagtail.core.blocks.StructBlock([('task_text', wagtail.core.blocks.CharBlock())], icon='download')), ('image', wagtail.images.blocks.ImageChooserBlock(icon='image')), ('task', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())], icon='tick'))], blank=True, null=True), + ), + ] diff --git a/server/book/migrations/0004_auto_20180815_1629.py b/server/book/migrations/0004_auto_20180815_1629.py new file mode 100644 index 00000000..8a1b6d6e --- /dev/null +++ b/server/book/migrations/0004_auto_20180815_1629.py @@ -0,0 +1,21 @@ +# Generated by Django 2.0.6 on 2018-08-15 16:29 + +from django.db import migrations +import wagtail.core.blocks +import wagtail.core.fields +import wagtail.images.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('book', '0003_auto_20180815_1349'), + ] + + operations = [ + migrations.AlterField( + model_name='contentblock', + name='contents', + field=wagtail.core.fields.StreamField([('text_block', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())], icon='doc-full')), ('modal_text', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.RichTextBlock()), ('modal_content', wagtail.core.blocks.RichTextBlock())], icon='placeholder')), ('student_entry', wagtail.core.blocks.StructBlock([('task_text', wagtail.core.blocks.CharBlock())], icon='download')), ('image_block', wagtail.images.blocks.ImageChooserBlock(icon='image')), ('task', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.RichTextBlock())], icon='tick'))], blank=True, null=True), + ), + ] diff --git a/server/book/models/contentblock.py b/server/book/models/contentblock.py index d9e8642d..49ec8a8e 100644 --- a/server/book/models/contentblock.py +++ b/server/book/models/contentblock.py @@ -28,10 +28,10 @@ class ContentBlock(Page): verbose_name_plural = 'Inhaltsblöcke' contents = StreamField([ - ('text', TextBlock(icon='doc-full')), + ('text_block', TextBlock(icon='doc-full')), ('modal_text', ModalTextBlock(icon='placeholder')), ('student_entry', StudentEntryBlock(icon='download')), - ('image', ImageChooserBlock(icon='image')), + ('image_block', ImageChooserBlock(icon='image')), ('task', TextBlock(icon='tick')) ], null=True, blank=True)