Refactor music video model and views: rename user to owner, add title field, and implement music management in group detail view
This commit is contained in:
parent
8ed39c78b8
commit
4e28311b1c
11 changed files with 272 additions and 8 deletions
|
@ -19,6 +19,10 @@ class Group(models.Model):
|
|||
|
||||
class MusicVideo(models.Model):
|
||||
yt_id = models.CharField(max_length=16)
|
||||
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||
title = models.CharField(blank=True)
|
||||
owner = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||
group = models.ForeignKey(Group, on_delete=models.CASCADE)
|
||||
blacklisted = models.BooleanField(default=False)
|
||||
|
||||
class Meta:
|
||||
unique_together = ["yt_id", "owner", "group"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue