mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 05:49:24 +02:00
Replaced is_public flag by brand new privacy_level field on playlists
This commit is contained in:
parent
9fdbc7b859
commit
859f8a0570
4 changed files with 27 additions and 3 deletions
|
@ -3,13 +3,15 @@ from django.utils import timezone
|
|||
|
||||
from mptt.models import MPTTModel, TreeOneToOneField
|
||||
|
||||
from funkwhale_api.common import fields
|
||||
|
||||
|
||||
class Playlist(models.Model):
|
||||
name = models.CharField(max_length=50)
|
||||
is_public = models.BooleanField(default=False)
|
||||
user = models.ForeignKey(
|
||||
'users.User', related_name="playlists", on_delete=models.CASCADE)
|
||||
creation_date = models.DateTimeField(default=timezone.now)
|
||||
privacy_level = fields.get_privacy_field()
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue