# Generated by Django 3.2.9 on 2021-12-01 17:29

from django.db import migrations, models
import django.db.models.deletion
import uuid
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.images.blocks
import wagtail.search.index


class Migration(migrations.Migration):

    dependencies = [
        ('wagtailimages', '0023_add_choose_permissions'),
        ('wagtailcore', '0066_collection_management_permissions'),
        ('home', '0009_auto_20211130_1432'),
    ]

    operations = [
        migrations.CreateModel(
            name='News',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('translation_key', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('name', models.CharField(max_length=255, verbose_name='nom')),
                ('short_description', models.CharField(max_length=510, verbose_name='description courte')),
                ('is_event', models.BooleanField(default=False, verbose_name='Evènement')),
                ('body', wagtail.core.fields.StreamField([('heading', wagtail.core.blocks.CharBlock(form_classname='full title', label='titre')), ('paragraph', wagtail.core.blocks.RichTextBlock(label='paragraphe')), ('image', wagtail.images.blocks.ImageChooserBlock())], blank=True, help_text="Corps de la page de détail d'une actualité", verbose_name='description')),
                ('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image')),
                ('locale', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='wagtailcore.locale')),
            ],
            options={
                'verbose_name': 'Actualité',
                'verbose_name_plural': 'Actualités',
                'abstract': False,
                'unique_together': {('translation_key', 'locale')},
            },
            bases=(wagtail.search.index.Indexed, models.Model),
        ),
    ]
