Change variable names in content blocks

This commit is contained in:
Ramon Wenger 2018-08-15 18:45:20 +02:00
parent 13d378897a
commit 0c31f838f2
3 changed files with 44 additions and 2 deletions

View File

@ -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),
),
]

View File

@ -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),
),
]

View File

@ -28,10 +28,10 @@ class ContentBlock(Page):
verbose_name_plural = 'Inhaltsblöcke' verbose_name_plural = 'Inhaltsblöcke'
contents = StreamField([ contents = StreamField([
('text', TextBlock(icon='doc-full')), ('text_block', TextBlock(icon='doc-full')),
('modal_text', ModalTextBlock(icon='placeholder')), ('modal_text', ModalTextBlock(icon='placeholder')),
('student_entry', StudentEntryBlock(icon='download')), ('student_entry', StudentEntryBlock(icon='download')),
('image', ImageChooserBlock(icon='image')), ('image_block', ImageChooserBlock(icon='image')),
('task', TextBlock(icon='tick')) ('task', TextBlock(icon='tick'))
], null=True, blank=True) ], null=True, blank=True)