ernestophone.ens.fr/calendrier/migrations/0001_initial.py

89 lines
2.9 KiB
Python
Raw Normal View History

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
2017-05-23 10:30:18 +02:00
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
2021-04-29 00:27:33 +02:00
("gestion", "0001_initial"),
]
operations = [
migrations.CreateModel(
2021-04-29 00:27:33 +02:00
name="Event",
fields=[
2021-04-29 00:27:33 +02:00
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
verbose_name="ID",
serialize=False,
),
),
("nom", models.CharField(max_length=100)),
("nomcourt", models.CharField(max_length=9, verbose_name="Nom court")),
("date", models.DateField()),
("debut", models.TimeField()),
("fin", models.TimeField(blank=True, null=True)),
("slug", models.CharField(max_length=7, editable=False, unique=True)),
("lieu", models.CharField(max_length=200)),
("description", models.TextField(blank=True)),
(
"desc_users",
models.TextField(
blank=True,
verbose_name="Infos (visible seulement des fanfaron-ne-s)",
null=True,
),
),
(
"calendrier",
models.BooleanField(
verbose_name="Afficher dans le calendrier pour tous",
default=False,
),
),
],
options={
2021-04-29 00:27:33 +02:00
"verbose_name": "Événement",
},
),
migrations.CreateModel(
2021-04-29 00:27:33 +02:00
name="Participants",
fields=[
2021-04-29 00:27:33 +02:00
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
verbose_name="ID",
serialize=False,
),
),
(
"reponse",
models.CharField(
max_length=20,
choices=[("oui", "Oui"), ("non", "Non"), ("pe", "Peut-être")],
default="non",
verbose_name="Réponse",
),
),
("details", models.CharField(blank=True, max_length=50)),
(
"event",
models.ForeignKey(to="calendrier.Event", on_delete=models.CASCADE),
),
(
"participant",
models.ForeignKey(
to="gestion.ErnestoUser", on_delete=models.CASCADE
),
),
],
),
]