Sith/com/migrations/0004_auto_20171221_1614.py

90 lines
3.0 KiB
Python
Raw Normal View History

2017-10-23 07:30:26 +00:00
from __future__ import unicode_literals
2024-06-24 11:07:36 +00:00
import django.db.models.deletion
2017-10-23 07:30:26 +00:00
import django.utils.timezone
from django.conf import settings
2024-06-24 11:07:36 +00:00
from django.db import migrations, models
2017-10-23 07:30:26 +00:00
class Migration(migrations.Migration):
dependencies = [
2018-10-04 19:29:19 +00:00
("club", "0010_auto_20170912_2028"),
2017-10-23 07:30:26 +00:00
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
2018-10-04 19:29:19 +00:00
("com", "0003_auto_20170115_2300"),
2017-10-23 07:30:26 +00:00
]
operations = [
migrations.CreateModel(
2018-10-04 19:29:19 +00:00
name="Poster",
2017-10-23 07:30:26 +00:00
fields=[
2018-10-04 19:29:19 +00:00
(
"id",
models.AutoField(
verbose_name="ID",
primary_key=True,
serialize=False,
auto_created=True,
),
),
(
"name",
models.CharField(verbose_name="name", max_length=128, default=""),
),
(
"file",
models.ImageField(verbose_name="file", upload_to="com/posters"),
),
("date_begin", models.DateTimeField(default=django.utils.timezone.now)),
("date_end", models.DateTimeField(blank=True, null=True)),
(
"display_time",
models.IntegerField(verbose_name="display time", default=30),
),
(
"is_moderated",
models.BooleanField(verbose_name="is moderated", default=False),
),
(
"club",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
verbose_name="club",
related_name="posters",
to="club.Club",
2018-10-04 19:29:19 +00:00
),
),
(
"moderator",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
2018-10-04 19:29:19 +00:00
verbose_name="moderator",
blank=True,
null=True,
related_name="moderated_posters",
to=settings.AUTH_USER_MODEL,
),
),
2017-10-23 07:30:26 +00:00
],
),
migrations.CreateModel(
2018-10-04 19:29:19 +00:00
name="Screen",
2017-10-23 07:30:26 +00:00
fields=[
2018-10-04 19:29:19 +00:00
(
"id",
models.AutoField(
verbose_name="ID",
primary_key=True,
serialize=False,
auto_created=True,
),
),
("name", models.CharField(verbose_name="name", max_length=128)),
2017-10-23 07:30:26 +00:00
],
),
migrations.AddField(
2018-10-04 19:29:19 +00:00
model_name="poster",
name="screens",
field=models.ManyToManyField(related_name="posters", to="com.Screen"),
2017-10-23 07:30:26 +00:00
),
]