# Generated by Django 4.2.13 on 2024-06-04 08:08

import cms_qe_plugins.validators
import django.core.serializers.json
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Iframe",
            fields=[
                (
                    "cmsplugin_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        related_name="%(app_label)s_%(class)s",
                        serialize=False,
                        to="cms.cmsplugin",
                    ),
                ),
                (
                    "src",
                    models.CharField(
                        help_text="Specifies the address of the document to embed in the &lt;iframe&gt;.",
                        max_length=255,
                        validators=[cms_qe_plugins.validators.validate_url_or_path],
                    ),
                ),
                (
                    "allow",
                    models.CharField(
                        blank=True,
                        help_text="Specifies a feature policy for the &lt;iframe&gt;. Form more see <a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#allow' target='_blank'>IFrame attributes.</a>.",
                        max_length=255,
                        null=True,
                    ),
                ),
                (
                    "allow_full_screen",
                    models.BooleanField(
                        blank=True,
                        help_text="Set to true if the &lt;iframe&gt; can activate fullscreen mode by calling the requestFullscreen() method.",
                        null=True,
                    ),
                ),
                (
                    "allow_payment_request",
                    models.BooleanField(
                        blank=True,
                        help_text="Set to true if a cross-origin &lt;iframe&gt; should be allowed to invoke the Payment Request API.",
                        null=True,
                    ),
                ),
                (
                    "height",
                    models.IntegerField(
                        blank=True,
                        help_text="Specifies the height of an &lt;iframe&gt;. Default height is 150 pixels.",
                        null=True,
                    ),
                ),
                (
                    "width",
                    models.IntegerField(
                        blank=True,
                        help_text="Specifies the width of an &lt;iframe&gt;. Default width is 300 pixels.",
                        null=True,
                    ),
                ),
                (
                    "loading",
                    models.CharField(
                        blank=True,
                        choices=[("", ""), ("eager", "eager"), ("lazy", "lazy")],
                        default=None,
                        help_text="Specifies whether a browser should load an iframe immediately or to defer loading of iframes until some conditions are met.",
                        max_length=255,
                        null=True,
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        blank=True,
                        help_text="Specifies the name of an &lt;iframe&gt;.",
                        max_length=255,
                        null=True,
                    ),
                ),
                (
                    "referrer_policy",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("", ""),
                            ("no-referrer", "no-referrer"),
                            (
                                "no-referrer-when-downgrade",
                                "no-referrer-when-downgrade",
                            ),
                            ("origin", "origin"),
                            ("origin-when-cross-origin", "origin-when-cross-origin"),
                            ("unsafe-url", "unsafe-url"),
                            ("same-origin", "same-origin"),
                            ("strict-origin", "strict-origin"),
                            (
                                "strict-origin-when-cross-origin",
                                "strict-origin-when-cross-origin",
                            ),
                        ],
                        default=None,
                        help_text="Specifies which referrer information to send when fetching the iframe.",
                        max_length=50,
                        null=True,
                    ),
                ),
                (
                    "sandbox",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("", ""),
                            ("allow-forms", "allow-forms"),
                            ("allow-pointer-lock", "allow-pointer-lock"),
                            ("allow-popups", "allow-popups"),
                            ("allow-same-origin", "allow-same-origin"),
                            ("allow-scripts", "allow-scripts"),
                            ("allow-top-navigation", "allow-top-navigation"),
                        ],
                        default=None,
                        help_text="Enables an extra set of restrictions for the content in an &lt;iframe&gt;.",
                        max_length=50,
                        null=True,
                    ),
                ),
                (
                    "src_doc",
                    models.TextField(
                        blank=True,
                        help_text="Specifies the HTML content of the page to show in the &lt;iframe&gt;.",
                        null=True,
                    ),
                ),
                (
                    "attributes",
                    models.JSONField(
                        blank=True,
                        encoder=django.core.serializers.json.DjangoJSONEncoder,
                        help_text='More attributes as JSON data. E.g. {"data-name": "value", "id": 42}',
                        null=True,
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=("cms.cmsplugin",),
        ),
        migrations.CreateModel(
            name="Link",
            fields=[
                (
                    "cmsplugin_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        related_name="%(app_label)s_%(class)s",
                        serialize=False,
                        to="cms.cmsplugin",
                    ),
                ),
                (
                    "href",
                    models.CharField(
                        help_text="Specifies the location of the linked document.",
                        max_length=255,
                        validators=[cms_qe_plugins.validators.validate_url_or_path],
                    ),
                ),
                (
                    "rel",
                    models.CharField(
                        choices=[
                            ("alternate", "alternate"),
                            ("author", "author"),
                            ("dns-prefetch", "dns-prefetch"),
                            ("help", "help"),
                            ("icon", "icon"),
                            ("license", "license"),
                            ("next", "next"),
                            ("pingback", "pingback"),
                            ("preconnect", "preconnect"),
                            ("prefetch", "prefetch"),
                            ("preload", "preload"),
                            ("prerender", "prerender"),
                            ("prev", "prev"),
                            ("search", "search"),
                            ("stylesheet", "stylesheet"),
                        ],
                        default="stylesheet",
                        help_text="Required. Specifies the relationship between the current document and the linked document.",
                        max_length=30,
                    ),
                ),
                (
                    "cross_origin",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("", ""),
                            ("anonymous", "anonymous"),
                            ("use-credentials", "use-credentials"),
                        ],
                        default=None,
                        help_text="Specifies how the element handles cross-origin requests.",
                        max_length=15,
                        null=True,
                    ),
                ),
                (
                    "hreflang",
                    models.CharField(
                        blank=True,
                        help_text="Specifies the language of the text in the linked document.",
                        max_length=30,
                        null=True,
                    ),
                ),
                (
                    "media",
                    models.CharField(
                        blank=True,
                        help_text="Specifies on what device the linked document will be displayed.",
                        max_length=255,
                        null=True,
                    ),
                ),
                (
                    "referrer_policy",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("", ""),
                            ("no-referrer", "no-referrer"),
                            (
                                "no-referrer-when-downgrade",
                                "no-referrer-when-downgrade",
                            ),
                            ("origin", "origin"),
                            ("origin-when-cross-origin", "origin-when-cross-origin"),
                            ("unsafe-url", "unsafe-url"),
                        ],
                        default=None,
                        help_text="Specifies which referrer to use when fetching the resource.",
                        max_length=50,
                        null=True,
                    ),
                ),
                (
                    "sizes",
                    models.CharField(
                        blank=True,
                        help_text='Specifies the size of the linked resource. Only for rel="icon".',
                        max_length=255,
                        null=True,
                    ),
                ),
                (
                    "title",
                    models.CharField(
                        blank=True,
                        help_text="Defines a preferred or an alternate stylesheet.",
                        max_length=255,
                        null=True,
                    ),
                ),
                (
                    "type",
                    models.CharField(
                        blank=True,
                        help_text="Specifies the media type of the linked document. E.g. 'text/css'.",
                        max_length=255,
                        null=True,
                    ),
                ),
                (
                    "attributes",
                    models.JSONField(
                        blank=True,
                        encoder=django.core.serializers.json.DjangoJSONEncoder,
                        help_text='More attributes as JSON data. E.g. {"data-name": "value", "id": 42}',
                        null=True,
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=("cms.cmsplugin",),
        ),
        migrations.CreateModel(
            name="Script",
            fields=[
                (
                    "cmsplugin_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        related_name="%(app_label)s_%(class)s",
                        serialize=False,
                        to="cms.cmsplugin",
                    ),
                ),
                (
                    "src",
                    models.CharField(
                        help_text="Specifies the location of the linked script.",
                        max_length=255,
                        validators=[cms_qe_plugins.validators.validate_url_or_path],
                    ),
                ),
                (
                    "asyncf",
                    models.BooleanField(
                        default=False,
                        help_text="Specifies that the script is downloaded in parallel to parsing the page, and executed as soon as it is available (before parsing completes) (only for external scripts)",
                        verbose_name="async",
                    ),
                ),
                (
                    "cross_origin",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("", ""),
                            ("anonymous", "anonymous"),
                            ("use-credentials", "use-credentials"),
                        ],
                        default=None,
                        help_text="Sets the mode of the request to an HTTP CORS Request.",
                        max_length=15,
                        null=True,
                    ),
                ),
                (
                    "defer",
                    models.BooleanField(
                        default=False,
                        help_text="Specifies that the script is downloaded in parallel to parsing the page, and executed after the page has finished parsing (only for external scripts)",
                    ),
                ),
                (
                    "integrity",
                    models.CharField(
                        blank=True,
                        help_text="Allows a browser to check the fetched script to ensure that the code is never loaded if the source has been manipulated",
                        max_length=255,
                        null=True,
                    ),
                ),
                (
                    "nomodule",
                    models.BooleanField(
                        default=False,
                        help_text="Specifies that the script should not be executed in browsers supporting ES2015 modules.",
                    ),
                ),
                (
                    "referrer_policy",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("", ""),
                            ("no-referrer", "no-referrer"),
                            (
                                "no-referrer-when-downgrade",
                                "no-referrer-when-downgrade",
                            ),
                            ("origin", "origin"),
                            ("origin-when-cross-origin", "origin-when-cross-origin"),
                            ("unsafe-url", "unsafe-url"),
                            ("same-origin", "same-origin"),
                            ("strict-origin", "strict-origin"),
                            (
                                "strict-origin-when-cross-origin",
                                "strict-origin-when-cross-origin",
                            ),
                        ],
                        default=None,
                        help_text="Specifies which referrer to use when fetching the resource.",
                        max_length=50,
                        null=True,
                    ),
                ),
                (
                    "type",
                    models.CharField(
                        blank=True,
                        help_text="Specifies the media type of the script.",
                        max_length=255,
                        null=True,
                    ),
                ),
                (
                    "attributes",
                    models.JSONField(
                        blank=True,
                        encoder=django.core.serializers.json.DjangoJSONEncoder,
                        help_text='More attributes as JSON data. E.g. {"data-name": "value", "id": 42}',
                        null=True,
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=("cms.cmsplugin",),
        ),
    ]
