# Generated by Django 2.2.11 on 2020-04-19 10:25

from django.db import migrations, models
import django.db.models.deletion
import staby.core.fields
import staby.media.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('pages', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Blog',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='pages.Page')),
            ],
            options={
                'staby_urls': 'staby.blog.urls',
            },
            bases=('pages.page',),
        ),
        migrations.CreateModel(
            name='BlogPost',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(blank=True)),
                ('title', models.CharField(max_length=255)),
                ('is_published', models.BooleanField()),
                ('published_from', models.DateTimeField(blank=True, null=True)),
                ('published_to', models.DateTimeField(blank=True, null=True)),
                ('teaser_image', staby.media.fields.FileBrowseField(blank=True, max_length=255, null=True)),
                ('teaser', staby.core.fields.RichTextField()),
                ('content', staby.core.fields.RichTextField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('blog', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='posts', to='blog.Blog')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
