23 lines
605 B
Python
23 lines
605 B
Python
from rest_framework.serializers import (IntegerField,
|
|
ModelSerializer,
|
|
Serializer,
|
|
StringRelatedField)
|
|
|
|
from profiles.models import SongRequest
|
|
from .radio import RadioSongSerializer
|
|
|
|
|
|
class JustPlayedSerializer(Serializer):
|
|
song_request = IntegerField()
|
|
|
|
|
|
class MakeRequestSerializer(Serializer):
|
|
song = IntegerField()
|
|
|
|
|
|
class GetRequestSerializer(ModelSerializer):
|
|
song = RadioSongSerializer()
|
|
|
|
class Meta:
|
|
model = SongRequest
|
|
fields = ('id', 'song')
|