serializers.py 349 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
from rest_framework import serializers

from funkwhale_api.music.serializers import TrackSerializerNested

from . import models


class UserTrackFavoriteSerializer(serializers.ModelSerializer):
    # track = TrackSerializerNested(read_only=True)
    class Meta:
        model = models.TrackFavorite
        fields = ('id', 'track', 'creation_date')