# Generated by Django 3.2.18 on 2023-03-03 15:53

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import dynamic_filenames


class Migration(migrations.Migration):
    dependencies = [
        ("events", "0024_event_event_speaker"),
        ("event_requests", "0004_auto_20230227_1554"),
    ]

    operations = [
        migrations.AlterField(
            model_name="eventasset",
            name="event",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="event_assets",
                related_query_name="event_asset",
                to="events.event",
                verbose_name="événement",
            ),
        ),
        migrations.AlterField(
            model_name="eventasset",
            name="file",
            field=models.FileField(
                blank=True,
                max_length=255,
                null=True,
                upload_to=dynamic_filenames.FilePattern(
                    filename_pattern="{app_label}/{model_name}/{instance.id}/{name}_{uuid:.8base32}{ext}"
                ),
                validators=[
                    django.core.validators.FileExtensionValidator(
                        ("pdf", "png", "ps", "svg", "xml")
                    )
                ],
                verbose_name="Fichier",
            ),
        ),
        migrations.AlterField(
            model_name="eventtheme",
            name="event_asset_templates",
            field=models.ManyToManyField(
                blank=True,
                related_name="event_themes",
                related_query_name="event_theme",
                to="event_requests.EventAssetTemplate",
                verbose_name="Templates de visuels",
            ),
        ),
        migrations.AlterField(
            model_name="eventthemetype",
            name="event_asset_templates",
            field=models.ManyToManyField(
                blank=True,
                related_name="event_theme_types",
                related_query_name="event_theme_type",
                to="event_requests.EventAssetTemplate",
                verbose_name="Templates de visuels",
            ),
        ),
    ]
