0001_initial.py 2.38 KB
# Generated by Django 4.2.9 on 2024-10-01 15:20

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('organismo', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='FechaEvento',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dia_evento', models.DateField(verbose_name='Días del evento')),
            ],
            options={
                'verbose_name': 'Fecha del Eventos',
                'verbose_name_plural': 'Fechas del Eventos',
            },
        ),
        migrations.CreateModel(
            name='Evento',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha_inicio', models.DateField(verbose_name='Fecha de inicio del evento')),
                ('hora_inicio', models.TimeField(blank=True, verbose_name='Hora de apertura')),
                ('hora_fin', models.TimeField(blank=True, verbose_name='Hora de cierre')),
                ('titulo', models.CharField(max_length=350)),
                ('categoria', models.SlugField(max_length=150)),
                ('direccion', models.URLField(max_length=150, verbose_name='ubicación')),
                ('descripcion', models.TextField(verbose_name='Descripción')),
                ('url', models.URLField(blank=True, max_length=300, verbose_name='Dirección Web')),
                ('imagen', models.ImageField(blank=True, upload_to='static/eventos', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['jpg', 'png'])], verbose_name='Banner promocional')),
                ('dependencia', models.ManyToManyField(blank=True, related_name='evento_dependencia', to='organismo.dependencia')),
                ('fechas', models.ManyToManyField(related_name='evento_fechas', to='evento.fechaevento', verbose_name='Días disponibles')),
                ('organismo', models.ManyToManyField(blank=True, related_name='evento_organismo', to='organismo.organismo')),
            ],
            options={
                'verbose_name': 'Evento',
                'verbose_name_plural': 'Eventos',
                'ordering': ('titulo', 'categoria'),
            },
        ),
    ]