# Generated by Django 4.1.4 on 2022-12-28 06:28

import cjkcms.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("wagtailcore", "0040_page_draft_title"),
        ("cjkcms", "0004_layoutsettings_articles_date_format_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="ProjectArticleIndexPage",
            fields=[
                (
                    "cjkcmspage_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="cjkcms.cjkcmspage",
                    ),
                ),
                (
                    "show_images",
                    models.BooleanField(default=True, verbose_name="Show images"),
                ),
                ("show_captions", models.BooleanField(default=True)),
                (
                    "show_meta",
                    models.BooleanField(
                        default=True, verbose_name="Show author and date info"
                    ),
                ),
                (
                    "show_preview_text",
                    models.BooleanField(default=True, verbose_name="Show preview text"),
                ),
                (
                    "body",
                    cjkcms.fields.CjkcmsStreamField(
                        blank=True, null=True, use_json_field=True
                    ),
                ),
            ],
            options={
                "verbose_name": "{{ uf_project }} Article Landing Page",
            },
            bases=("cjkcms.cjkcmspage",),
        ),
        migrations.CreateModel(
            name="ProjectWebPage",
            fields=[
                (
                    "cjkcmspage_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="cjkcms.cjkcmspage",
                    ),
                ),
                (
                    "body",
                    cjkcms.fields.CjkcmsStreamField(
                        blank=True, null=True, use_json_field=True
                    ),
                ),
            ],
            options={
                "verbose_name": "{{ uf_project }} Web Page",
            },
            bases=("cjkcms.cjkcmspage",),
        ),
        migrations.CreateModel(
            name="ProjectArticlePage",
            fields=[
                (
                    "cjkcmspage_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="cjkcms.cjkcmspage",
                    ),
                ),
                (
                    "caption",
                    models.CharField(
                        blank=True, max_length=255, verbose_name="Caption"
                    ),
                ),
                (
                    "author_display",
                    models.CharField(
                        blank=True,
                        help_text="Override how the author’s name displays on this article.",
                        max_length=255,
                        verbose_name="Display author as",
                    ),
                ),
                (
                    "date_display",
                    models.DateField(
                        blank=True, null=True, verbose_name="Display publish date"
                    ),
                ),
                (
                    "body",
                    cjkcms.fields.CjkcmsStreamField(
                        blank=True, null=True, use_json_field=True
                    ),
                ),
                (
                    "author",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to=settings.AUTH_USER_MODEL,
                        verbose_name="Author",
                    ),
                ),
            ],
            options={
                "verbose_name": "{{ uf_project }} Article",
                "ordering": ["-first_published_at"],
            },
            bases=("cjkcms.cjkcmspage",),
        ),
    ]
