text: # -*- coding: utf-8 -*-
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  import modelcluster.contrib.taggit
  import modelcluster.fields
  import wagtail.core.blocks
  import wagtail.core.fields
  import wagtail.embeds.blocks
  import wagtail.images.blocks
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('taggit', '0003_taggeditem_add_unique_index'),
          ('wagtailcore', '0040_page_draft_title'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='RegularPage',
              fields=[
                  ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                  ('content', wagtail.core.fields.StreamField([('heading_block', wagtail.core.blocks.StructBlock([('heading_text', wagtail.core.blocks.CharBlock(classname='title', required=True)), ('size', wagtail.core.blocks.ChoiceBlock(blank=True, choices=[('', 'Select a header size'), ('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4')], required=False))])), ('paragraph_block', wagtail.core.blocks.RichTextBlock(icon='fa-paragraph', template='blocks/paragraph_block.html')), ('image_block', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.core.blocks.CharBlock(required=False)), ('attribution', wagtail.core.blocks.CharBlock(required=False))])), ('block_quote', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.TextBlock()), ('attribute_name', wagtail.core.blocks.CharBlock(blank=True, label='e.g. Mary Berry', required=False))])), ('embed_block', wagtail.embeds.blocks.EmbedBlock(help_text='Insert an embed URL e.g https://www.youtube.com/embed/SGJFWirQ3ks', icon='fa-s15', template='blocks/embed_block.html'))], blank=True, verbose_name='Article')),
              ],
              options={
                  'abstract': False,
              },
              bases=('wagtailcore.page',),
          ),
          migrations.CreateModel(
              name='Article',
              fields=[
                  ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                  ('content', wagtail.core.fields.StreamField([('heading_block', wagtail.core.blocks.StructBlock([('heading_text', wagtail.core.blocks.CharBlock(classname='title', required=True)), ('size', wagtail.core.blocks.ChoiceBlock(blank=True, choices=[('', 'Select a header size'), ('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4')], required=False))])), ('paragraph_block', wagtail.core.blocks.RichTextBlock(icon='fa-paragraph', template='blocks/paragraph_block.html')), ('image_block', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.core.blocks.CharBlock(required=False)), ('attribution', wagtail.core.blocks.CharBlock(required=False))])), ('block_quote', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.TextBlock()), ('attribute_name', wagtail.core.blocks.CharBlock(blank=True, label='e.g. Mary Berry', required=False))])), ('embed_block', wagtail.embeds.blocks.EmbedBlock(help_text='Insert an embed URL e.g https://www.youtube.com/embed/SGJFWirQ3ks', icon='fa-s15', template='blocks/embed_block.html'))], blank=True, verbose_name='Article')),
              ],
              options={
                  'abstract': False,
              },
              bases=('wagtailcore.page',),
          ),
          migrations.CreateModel(
              name='ArticleTag',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('content_object', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='tagged_items', to='base.Article')),
                  ('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='base_articletag_items', to='taggit.Tag')),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.AddField(
              model_name='article',
              name='tags',
              field=modelcluster.contrib.taggit.ClusterTaggableManager(blank=True, help_text='A comma-separated list of tags.', through='base.ArticleTag', to='taggit.Tag', verbose_name='Tags'),
          ),
          migrations.CreateModel(
              name='Author',
              fields=[
                  ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                  ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'abstract': False,
              },
              bases=('wagtailcore.page',),
          ),
          migrations.CreateModel(
              name='AuthorArticleRel',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
                  ('article', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='authors', to='base.Article')),
                  ('author', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, to='base.Author')),
              ],
              options={
                  'ordering': ['sort_order'],
                  'abstract': False,
              },
          ),
      ]
  