text: # -*- coding: utf-8 -*-
  # Generated by Django 1.10.2 on 2016-10-25 05:19
  from __future__ import unicode_literals
  
  import django.db.models.deletion
  import wagtail.core.blocks
  import wagtail.core.fields
  from django.db import migrations, models
  
  import wagtailmodelchooser.blocks
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          ('wagtailcore', '0030_index_on_pagerevision_created_at'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Author',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=255)),
              ],
          ),
          migrations.CreateModel(
              name='Book',
              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')),
                  ('author', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.Author')),
              ],
              options={
                  'abstract': False,
              },
              bases=('wagtailcore.page',),
          ),
          migrations.CreateModel(
              name='ContentPage',
              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')),
                  ('body', wagtail.core.fields.StreamField((('text', wagtail.core.blocks.RichTextBlock()), ('author', wagtailmodelchooser.blocks.ModelChooserBlock(target_model='app.author')), ('book', wagtailmodelchooser.blocks.ModelChooserBlock(target_model='app.book'))))),
                  ('favourite_book', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='app.Book')),
              ],
              options={
                  'abstract': False,
              },
              bases=('wagtailcore.page',),
          ),
      ]
  