New 'events' app, first model

The objective is to move (at some point) all the management logic in
this app. Before that time: as long as the events app does not have all
the features necessary to be used in production it is only available in
dev mode and coexists with the old event system. When it's ready we'll
move the old events in the new app (data migration) and remove the old
system.
This commit is contained in:
Martin Pépin 2019-10-05 14:34:30 +02:00
parent ef97afd86c
commit 34e552f760
No known key found for this signature in database
GPG key ID: E7520278B1774448
8 changed files with 111 additions and 0 deletions

View file

@ -0,0 +1,67 @@
# Generated by Django 2.2.6 on 2019-10-05 12:28
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="Event",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("title", models.CharField(max_length=200, verbose_name="titre")),
("location", models.CharField(max_length=200, verbose_name="lieu")),
(
"start_date",
models.DateTimeField(
blank=True, null=True, verbose_name="date de début"
),
),
(
"end_date",
models.DateTimeField(
blank=True, null=True, verbose_name="date de fin"
),
),
(
"description",
models.TextField(blank=True, verbose_name="description"),
),
(
"image",
models.ImageField(
blank=True,
null=True,
upload_to="imgs/events/",
verbose_name="image",
),
),
(
"registration_open",
models.BooleanField(
default=True, verbose_name="inscriptions ouvertes"
),
),
(
"old",
models.BooleanField(
default=False, verbose_name="archiver (événement fini)"
),
),
],
options={"verbose_name": "événement", "verbose_name_plural": "événements"},
)
]