# Generated by Django 3.2.12 on 2022-03-26 18:00

import ckeditor.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import filer.fields.image


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.FILER_IMAGE_MODEL),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('simpel_themes', '0001_initial'),
        ('simpel_pages', '0001_initial'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='page',
            name='content',
        ),
        migrations.RemoveField(
            model_name='page',
            name='summary',
        ),
        migrations.RemoveField(
            model_name='page',
            name='thumbnail',
        ),
        migrations.AddField(
            model_name='page',
            name='bookmarks',
            field=models.ManyToManyField(blank=True, null=True, related_name='bookmarks', to=settings.AUTH_USER_MODEL, verbose_name='Users who bookmark this page.'),
        ),
        migrations.AddField(
            model_name='page',
            name='data',
            field=models.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='page',
            name='real_model',
            field=models.CharField(blank=True, editable=False, max_length=120, null=True),
        ),
        migrations.AlterField(
            model_name='page',
            name='template',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='pages', to='simpel_themes.modeltemplate', verbose_name='Template'),
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='simpel_pages.page')),
                ('content', ckeditor.fields.RichTextField(blank=True, null=True, verbose_name='content')),
                ('summary', ckeditor.fields.RichTextField(blank=True, null=True, verbose_name='summary')),
                ('thumbnail', filer.fields.image.FilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='simpelpages', to=settings.FILER_IMAGE_MODEL)),
            ],
            options={
                'verbose_name': 'post',
                'verbose_name_plural': 'posts',
                'abstract': False,
            },
            bases=('simpel_pages.page',),
        ),
    ]
