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

Update Show model

Replace ModelWithImageFields with foreign key to Image.
parent 0debba55
No related branches found
No related tags found
No related merge requests found
......@@ -255,21 +255,12 @@ class LicenseType(models.Model):
return self.type
class Show(ModelWithImageFields, ModelWithCreatedUpdatedFields):
predecessor = models.ForeignKey(
"self",
blank=True,
null=True,
on_delete=models.CASCADE,
related_name="successors",
)
hosts = models.ManyToManyField(Host, blank=True, related_name="shows")
owners = models.ManyToManyField(User, blank=True, related_name="shows")
language = models.ManyToManyField(Language, blank=True, related_name="shows")
type = models.ForeignKey(
Type, blank=True, null=True, on_delete=models.CASCADE, related_name="shows"
)
class Show(ModelWithCreatedUpdatedFields):
category = models.ManyToManyField(Category, blank=True, related_name="shows")
cba_series_id = models.IntegerField(blank=True, null=True)
default_playlist_id = models.IntegerField(blank=True, null=True)
description = models.TextField(blank=True, null=True)
email = models.EmailField(blank=True, null=True)
funding_category = models.ForeignKey(
FundingCategory,
null=True,
......@@ -277,19 +268,29 @@ class Show(ModelWithImageFields, ModelWithCreatedUpdatedFields):
blank=True,
related_name="shows",
)
topic = models.ManyToManyField(Topic, blank=True, related_name="shows")
hosts = models.ManyToManyField(Host, blank=True, related_name="shows")
image = models.ForeignKey(Image, null=True, on_delete=models.CASCADE, related_name="shows")
internal_note = models.TextField(blank=True, null=True)
is_active = models.BooleanField(default=True)
is_public = models.BooleanField(default=False)
language = models.ManyToManyField(Language, blank=True, related_name="shows")
logo = models.ImageField(blank=True, null=True, upload_to="show_images")
music_focus = models.ManyToManyField(MusicFocus, blank=True, related_name="shows")
name = models.CharField(max_length=255)
slug = models.CharField(max_length=255, unique=True)
logo = models.ImageField(blank=True, null=True, upload_to="show_images")
owners = models.ManyToManyField(User, blank=True, related_name="shows")
predecessor = models.ForeignKey(
"self",
blank=True,
null=True,
on_delete=models.CASCADE,
related_name="successors",
)
short_description = models.TextField()
description = models.TextField(blank=True, null=True)
email = models.EmailField(blank=True, null=True)
cba_series_id = models.IntegerField(blank=True, null=True)
default_playlist_id = models.IntegerField(blank=True, null=True)
is_active = models.BooleanField(default=True)
is_public = models.BooleanField(default=False)
internal_note = models.TextField(blank=True, null=True)
slug = models.CharField(max_length=255, unique=True)
topic = models.ManyToManyField(Topic, blank=True, related_name="shows")
type = models.ForeignKey(
Type, blank=True, null=True, on_delete=models.CASCADE, related_name="shows"
)
class Meta:
ordering = ("slug",)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment