spradio-server-django/savepointradio/api/serializers/controls.py
2018-04-05 16:22:15 -04:00

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')