Replaced is_public flag by brand new privacy_level field on playlists

This commit is contained in:
Eliot Berriot 2018-03-16 23:30:37 +01:00
parent 9fdbc7b859
commit 859f8a0570
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
4 changed files with 27 additions and 3 deletions

View file

@ -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