use a dedicated serializer to handle library creation

This commit is contained in:
Eliot Berriot 2018-04-10 22:47:13 +02:00
parent 0b2fe8439a
commit 3caa03aedf
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
7 changed files with 182 additions and 46 deletions

View file

@ -137,6 +137,13 @@ class Library(models.Model):
# should we automatically import new files from this library?
autoimport = models.BooleanField()
tracks_count = models.PositiveIntegerField(null=True, blank=True)
follow = models.OneToOneField(
Follow,
related_name='library',
null=True,
blank=True,
on_delete=models.SET_NULL,
)
class LibraryTrack(models.Model):