class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('chunked_media', '0001_initial'),
        ('wagtailcore', '0028_merge'),
    ]

    operations = [
        migrations.CreateModel(
            name='EventPage',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                ('date_from', models.DateField(null=True, verbose_name=b'Start date')),
                ('date_to', models.DateField(blank=True, help_text=b'Not required if event is on a single day', null=True, verbose_name=b'End date')),
                ('time_from', models.TimeField(blank=True, null=True, verbose_name=b'Start time')),
                ('time_to', models.TimeField(blank=True, null=True, verbose_name=b'End time')),
                ('location', models.CharField(max_length=255)),
                ('body', fields.RichTextField(blank=True)),
                ('cost', models.CharField(max_length=255)),
                ('signup_link', models.URLField(blank=True)),
            ],
            options={
                'abstract': False,
            },
            bases=('wagtailcore.page',),
        ),
        migrations.CreateModel(
            name='EventPageRelatedMedia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
                ('title', models.CharField(help_text=b'Link title', max_length=255)),
                ('link_media', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailmedia.Media')),
                ('page', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='related_media', to='knowledge_hub.chunked_media_tests.EventPage')),
            ],
            options={
                'ordering': ['sort_order'],
                'abstract': False,
            },
        ),
    ]
Example #2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("wagtailmedia", "0001_initial"),
        ("wagtailcore", "0028_merge"),
    ]

    operations = [
        migrations.CreateModel(
            name="EventPage",
            fields=[
                (
                    "page_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="wagtailcore.Page",
                    ),
                ),
                ("date_from",
                 models.DateField(null=True, verbose_name="Start date")),
                (
                    "date_to",
                    models.DateField(
                        blank=True,
                        help_text="Not required if event is on a single day",
                        null=True,
                        verbose_name="End date",
                    ),
                ),
                (
                    "time_from",
                    models.TimeField(blank=True,
                                     null=True,
                                     verbose_name="Start time"),
                ),
                (
                    "time_to",
                    models.TimeField(blank=True,
                                     null=True,
                                     verbose_name="End time"),
                ),
                ("location", models.CharField(max_length=255)),
                ("body", fields.RichTextField(blank=True)),
                ("cost", models.CharField(max_length=255)),
                ("signup_link", models.URLField(blank=True)),
            ],
            options={
                "abstract": False,
            },
            bases=("wagtailcore.page", ),
        ),
        migrations.CreateModel(
            name="EventPageRelatedMedia",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "sort_order",
                    models.IntegerField(blank=True, editable=False, null=True),
                ),
                ("title",
                 models.CharField(help_text="Link title", max_length=255)),
                (
                    "link_media",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="wagtailmedia.Media",
                    ),
                ),
                (
                    "page",
                    modelcluster.fields.ParentalKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="related_media",
                        to="wagtailmedia_tests.EventPage",
                    ),
                ),
            ],
            options={
                "ordering": ["sort_order"],
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="CustomMedia",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=255,
                                           verbose_name="title")),
                ("file",
                 models.FileField(upload_to="media", verbose_name="file")),
                (
                    "type",
                    models.CharField(
                        choices=[("audio", "Audio file"),
                                 ("video", "Video file")],
                        max_length=255,
                    ),
                ),
                (
                    "duration",
                    models.PositiveIntegerField(
                        help_text="Duration in seconds",
                        verbose_name="duration"),
                ),
                (
                    "width",
                    models.PositiveIntegerField(blank=True,
                                                null=True,
                                                verbose_name="width"),
                ),
                (
                    "height",
                    models.PositiveIntegerField(blank=True,
                                                null=True,
                                                verbose_name="height"),
                ),
                (
                    "thumbnail",
                    models.FileField(
                        blank=True,
                        upload_to="media_thumbnails",
                        verbose_name="thumbnail",
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True,
                                         verbose_name="created at"),
                ),
                (
                    "collection",
                    models.ForeignKey(
                        default=wagtail.core.models.get_root_collection_id,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="wagtailcore.Collection",
                        verbose_name="collection",
                    ),
                ),
                (
                    "tags",
                    taggit.managers.TaggableManager(
                        blank=True,
                        help_text=None,
                        through="taggit.TaggedItem",
                        to="taggit.Tag",
                        verbose_name="tags",
                    ),
                ),
                (
                    "uploaded_by_user",
                    models.ForeignKey(
                        blank=True,
                        editable=False,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to=settings.AUTH_USER_MODEL,
                        verbose_name="uploaded by user",
                    ),
                ),
            ],
            options={
                "verbose_name": "media",
                "abstract": False,
            },
            bases=(wagtail.search.index.Indexed, models.Model),
        ),
    ]
Example #3
0
class Migration(migrations.Migration):

    dependencies = [
        ('wagtailimages', '0006_add_verbose_names'),
        ('wagtaildocs', '0003_add_verbose_names'),
        ('wagtailcore', '0001_squashed_0016_change_page_url_path_to_text_field'),
    ]

    operations = [
        migrations.CreateModel(
            name='StandardIndexPage',
            fields=[
                ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page', on_delete=django.db.models.deletion.CASCADE)),
                ('intro', fields.RichTextField(blank=True)),
                ('feed_image', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)),
            ],
            options={
                'abstract': False,
            },
            bases=('wagtailcore.page',),
        ),
        migrations.CreateModel(
            name='StandardIndexPageRelatedLink',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('sort_order', models.IntegerField(null=True, editable=False, blank=True)),
                ('link_external', models.URLField(verbose_name=b'External link', blank=True)),
                ('title', models.CharField(help_text=b'Link title', max_length=255)),
                ('link_document', models.ForeignKey(related_name='+', blank=True, to='wagtaildocs.Document', null=True, on_delete=django.db.models.deletion.SET_NULL)),
            ],
            options={
                'ordering': ['sort_order'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='StandardPage',
            fields=[
                ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page', on_delete=django.db.models.deletion.SET_NULL)),
                ('intro', fields.RichTextField(blank=True)),
                ('body', fields.RichTextField(blank=True)),
                ('feed_image', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)),
            ],
            options={
                'abstract': False,
            },
            bases=('wagtailcore.page',),
        ),
        migrations.CreateModel(
            name='StandardPageCarouselItem',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('sort_order', models.IntegerField(null=True, editable=False, blank=True)),
                ('link_external', models.URLField(verbose_name=b'External link', blank=True)),
                ('embed_url', models.URLField(verbose_name=b'Embed URL', blank=True)),
                ('caption', models.CharField(max_length=255, blank=True)),
                ('image', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)),
                ('link_document', models.ForeignKey(related_name='+', blank=True, to='wagtaildocs.Document', null=True, on_delete=django.db.models.deletion.SET_NULL)),
                ('link_page', models.ForeignKey(related_name='+', blank=True, to='wagtailcore.Page', null=True, on_delete=django.db.models.deletion.SET_NULL)),
                ('page', modelcluster.fields.ParentalKey(related_name='carousel_items', to='oc_core.StandardPage')),
            ],
            options={
                'ordering': ['sort_order'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='StandardPageRelatedLink',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('sort_order', models.IntegerField(null=True, editable=False, blank=True)),
                ('link_external', models.URLField(verbose_name=b'External link', blank=True)),
                ('title', models.CharField(help_text=b'Link title', max_length=255)),
                ('link_document', models.ForeignKey(related_name='+', blank=True, to='wagtaildocs.Document', null=True, on_delete=django.db.models.deletion.SET_NULL)),
                ('link_page', models.ForeignKey(related_name='+', blank=True, to='wagtailcore.Page', null=True, on_delete=django.db.models.deletion.SET_NULL)),
                ('page', modelcluster.fields.ParentalKey(related_name='related_links', to='oc_core.StandardPage')),
            ],
            options={
                'ordering': ['sort_order'],
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='standardindexpagerelatedlink',
            name='link_page',
            field=models.ForeignKey(related_name='+', blank=True, to='wagtailcore.Page', null=True, on_delete=django.db.models.deletion.SET_NULL),
        ),
        migrations.AddField(
            model_name='standardindexpagerelatedlink',
            name='page',
            field=modelcluster.fields.ParentalKey(related_name='related_links', to='oc_core.StandardIndexPage'),
        ),
    ]
Example #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('wagtailmedia', '0001_initial'),
        ('wagtailcore', '0028_merge'),
    ]

    operations = [
        migrations.CreateModel(
            name='EventPage',
            fields=[
                ('page_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='wagtailcore.Page')),
                ('date_from',
                 models.DateField(null=True, verbose_name='Start date')),
                ('date_to',
                 models.DateField(
                     blank=True,
                     help_text='Not required if event is on a single day',
                     null=True,
                     verbose_name='End date')),
                ('time_from',
                 models.TimeField(blank=True,
                                  null=True,
                                  verbose_name='Start time')),
                ('time_to',
                 models.TimeField(blank=True,
                                  null=True,
                                  verbose_name='End time')),
                ('location', models.CharField(max_length=255)),
                ('body', fields.RichTextField(blank=True)),
                ('cost', models.CharField(max_length=255)),
                ('signup_link', models.URLField(blank=True)),
            ],
            options={
                'abstract': False,
            },
            bases=('wagtailcore.page', ),
        ),
        migrations.CreateModel(
            name='EventPageRelatedMedia',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sort_order',
                 models.IntegerField(blank=True, editable=False, null=True)),
                ('title',
                 models.CharField(help_text='Link title', max_length=255)),
                ('link_media',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='+',
                                   to='wagtailmedia.Media')),
                ('page',
                 modelcluster.fields.ParentalKey(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='related_media',
                     to='wagtailmedia_tests.EventPage')),
            ],
            options={
                'ordering': ['sort_order'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CustomMedia',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=255,
                                           verbose_name='title')),
                ('file',
                 models.FileField(upload_to='media', verbose_name='file')),
                ('type',
                 models.CharField(choices=[('audio', 'Audio file'),
                                           ('video', 'Video file')],
                                  max_length=255)),
                ('duration',
                 models.PositiveIntegerField(help_text='Duration in seconds',
                                             verbose_name='duration')),
                ('width',
                 models.PositiveIntegerField(blank=True,
                                             null=True,
                                             verbose_name='width')),
                ('height',
                 models.PositiveIntegerField(blank=True,
                                             null=True,
                                             verbose_name='height')),
                ('thumbnail',
                 models.FileField(blank=True,
                                  upload_to='media_thumbnails',
                                  verbose_name='thumbnail')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='created at')),
                ('collection',
                 models.ForeignKey(
                     default=wagtail.core.models.get_root_collection_id,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='+',
                     to='wagtailcore.Collection',
                     verbose_name='collection')),
                ('tags',
                 taggit.managers.TaggableManager(blank=True,
                                                 help_text=None,
                                                 through='taggit.TaggedItem',
                                                 to='taggit.Tag',
                                                 verbose_name='tags')),
                ('uploaded_by_user',
                 models.ForeignKey(
                     blank=True,
                     editable=False,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='uploaded by user')),
            ],
            options={
                'verbose_name': 'media',
                'abstract': False,
            },
            bases=(wagtail.search.index.Indexed, models.Model),
        ),
    ]