Skip to content
Snippets Groups Projects
Verified Commit 59f87ceb authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

feat: add optional language and topic to Timeslot

parent b11c2cc2
No related branches found
No related tags found
No related merge requests found
# Generated by Django 4.2.2 on 2023-09-06 01:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("program", "0071_host_owners"),
]
operations = [
migrations.AddField(
model_name="timeslot",
name="language",
field=models.ManyToManyField(
blank=True, related_name="timeslots", to="program.language"
),
),
migrations.AddField(
model_name="timeslot",
name="topic",
field=models.ManyToManyField(blank=True, related_name="timeslots", to="program.topic"),
),
]
...@@ -394,6 +394,7 @@ class TimeSlotManager(models.Manager): ...@@ -394,6 +394,7 @@ class TimeSlotManager(models.Manager):
class TimeSlot(models.Model): class TimeSlot(models.Model):
end = models.DateTimeField() end = models.DateTimeField()
language = models.ManyToManyField(Language, blank=True, related_name="timeslots")
memo = models.TextField(blank=True) memo = models.TextField(blank=True)
playlist_id = models.IntegerField(null=True) playlist_id = models.IntegerField(null=True)
repetition_of = models.ForeignKey( repetition_of = models.ForeignKey(
...@@ -401,6 +402,7 @@ class TimeSlot(models.Model): ...@@ -401,6 +402,7 @@ class TimeSlot(models.Model):
) )
schedule = models.ForeignKey(Schedule, on_delete=models.CASCADE, related_name="timeslots") schedule = models.ForeignKey(Schedule, on_delete=models.CASCADE, related_name="timeslots")
start = models.DateTimeField() start = models.DateTimeField()
topic = models.ManyToManyField(Topic, blank=True, related_name="timeslots")
objects = TimeSlotManager() objects = TimeSlotManager()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment