# Generated by Django 3.2.19 on 2023-05-24 12:56

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import simple_history.models


class Migration(migrations.Migration):
    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("cms", "0014_page_support_copy_paste"),
    ]

    operations = [
        migrations.CreateModel(
            name="HistoricalPage",
            fields=[
                (
                    "id",
                    models.IntegerField(
                        auto_created=True, blank=True, db_index=True, verbose_name="ID"
                    ),
                ),
                (
                    "support_copy_paste",
                    models.BooleanField(
                        default=True,
                        help_text="Turn this on if copy-pasting content from a word processor, or using the toolbar to format text. It tells Janeway to clear out formatting that does not play nice. Turn it off and leave it off if anyone has added custom HTML or CSS using the code view, since it might remove custom code.",
                    ),
                ),
                ("object_id", models.PositiveIntegerField(blank=True, null=True)),
                (
                    "name",
                    models.CharField(
                        help_text="The relative URL path to the page, using lowercase letters and hyphens. For example, a page about research integrity might be “research-integrity”.",
                        max_length=300,
                        verbose_name="Link",
                    ),
                ),
                (
                    "display_name",
                    models.CharField(
                        help_text="Name of the page, in 100 characters or fewer, displayed in the nav and in the top-level heading on the page (e.g. “Research Integrity”).",
                        max_length=100,
                    ),
                ),
                (
                    "display_name_en",
                    models.CharField(
                        help_text="Name of the page, in 100 characters or fewer, displayed in the nav and in the top-level heading on the page (e.g. “Research Integrity”).",
                        max_length=100,
                        null=True,
                    ),
                ),
                (
                    "display_name_en_us",
                    models.CharField(
                        help_text="Name of the page, in 100 characters or fewer, displayed in the nav and in the top-level heading on the page (e.g. “Research Integrity”).",
                        max_length=100,
                        null=True,
                    ),
                ),
                (
                    "display_name_fr",
                    models.CharField(
                        help_text="Name of the page, in 100 characters or fewer, displayed in the nav and in the top-level heading on the page (e.g. “Research Integrity”).",
                        max_length=100,
                        null=True,
                    ),
                ),
                (
                    "display_name_de",
                    models.CharField(
                        help_text="Name of the page, in 100 characters or fewer, displayed in the nav and in the top-level heading on the page (e.g. “Research Integrity”).",
                        max_length=100,
                        null=True,
                    ),
                ),
                (
                    "display_name_nl",
                    models.CharField(
                        help_text="Name of the page, in 100 characters or fewer, displayed in the nav and in the top-level heading on the page (e.g. “Research Integrity”).",
                        max_length=100,
                        null=True,
                    ),
                ),
                (
                    "display_name_cy",
                    models.CharField(
                        help_text="Name of the page, in 100 characters or fewer, displayed in the nav and in the top-level heading on the page (e.g. “Research Integrity”).",
                        max_length=100,
                        null=True,
                    ),
                ),
                (
                    "content",
                    models.TextField(
                        blank=True,
                        help_text="The content of the page. For headings, we recommend using the Style dropdown (looks like a wand) and selecting a heading level from 2 to 6, as the display name field occupies the place of heading level 1. Note that copying and pasting from a word processor can produce unwanted results, but you can use Remove Font Style (looks like an eraser) to remove some unwanted formatting. To edit the page as HTML, turn on the Code View (<>).",
                        null=True,
                    ),
                ),
                (
                    "content_en",
                    models.TextField(
                        blank=True,
                        help_text="The content of the page. For headings, we recommend using the Style dropdown (looks like a wand) and selecting a heading level from 2 to 6, as the display name field occupies the place of heading level 1. Note that copying and pasting from a word processor can produce unwanted results, but you can use Remove Font Style (looks like an eraser) to remove some unwanted formatting. To edit the page as HTML, turn on the Code View (<>).",
                        null=True,
                    ),
                ),
                (
                    "content_en_us",
                    models.TextField(
                        blank=True,
                        help_text="The content of the page. For headings, we recommend using the Style dropdown (looks like a wand) and selecting a heading level from 2 to 6, as the display name field occupies the place of heading level 1. Note that copying and pasting from a word processor can produce unwanted results, but you can use Remove Font Style (looks like an eraser) to remove some unwanted formatting. To edit the page as HTML, turn on the Code View (<>).",
                        null=True,
                    ),
                ),
                (
                    "content_fr",
                    models.TextField(
                        blank=True,
                        help_text="The content of the page. For headings, we recommend using the Style dropdown (looks like a wand) and selecting a heading level from 2 to 6, as the display name field occupies the place of heading level 1. Note that copying and pasting from a word processor can produce unwanted results, but you can use Remove Font Style (looks like an eraser) to remove some unwanted formatting. To edit the page as HTML, turn on the Code View (<>).",
                        null=True,
                    ),
                ),
                (
                    "content_de",
                    models.TextField(
                        blank=True,
                        help_text="The content of the page. For headings, we recommend using the Style dropdown (looks like a wand) and selecting a heading level from 2 to 6, as the display name field occupies the place of heading level 1. Note that copying and pasting from a word processor can produce unwanted results, but you can use Remove Font Style (looks like an eraser) to remove some unwanted formatting. To edit the page as HTML, turn on the Code View (<>).",
                        null=True,
                    ),
                ),
                (
                    "content_nl",
                    models.TextField(
                        blank=True,
                        help_text="The content of the page. For headings, we recommend using the Style dropdown (looks like a wand) and selecting a heading level from 2 to 6, as the display name field occupies the place of heading level 1. Note that copying and pasting from a word processor can produce unwanted results, but you can use Remove Font Style (looks like an eraser) to remove some unwanted formatting. To edit the page as HTML, turn on the Code View (<>).",
                        null=True,
                    ),
                ),
                (
                    "content_cy",
                    models.TextField(
                        blank=True,
                        help_text="The content of the page. For headings, we recommend using the Style dropdown (looks like a wand) and selecting a heading level from 2 to 6, as the display name field occupies the place of heading level 1. Note that copying and pasting from a word processor can produce unwanted results, but you can use Remove Font Style (looks like an eraser) to remove some unwanted formatting. To edit the page as HTML, turn on the Code View (<>).",
                        null=True,
                    ),
                ),
                ("is_markdown", models.BooleanField(default=True)),
                ("edited", models.DateTimeField(blank=True, editable=False)),
                ("history_id", models.AutoField(primary_key=True, serialize=False)),
                ("history_date", models.DateTimeField(db_index=True)),
                ("history_change_reason", models.CharField(max_length=100, null=True)),
                (
                    "history_type",
                    models.CharField(
                        choices=[("+", "Created"), ("~", "Changed"), ("-", "Deleted")],
                        max_length=1,
                    ),
                ),
                (
                    "content_type",
                    models.ForeignKey(
                        blank=True,
                        db_constraint=False,
                        null=True,
                        on_delete=django.db.models.deletion.DO_NOTHING,
                        related_name="+",
                        to="contenttypes.contenttype",
                    ),
                ),
                (
                    "history_user",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "verbose_name": "historical page",
                "verbose_name_plural": "historical pages",
                "ordering": ("-history_date", "-history_id"),
                "get_latest_by": ("history_date", "history_id"),
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
    ]
