Created some template http endpoints for the api and a serializer for the Song model class

This commit is contained in:
amazing-username
2019-02-09 00:51:43 +00:00
parent 4777d0bc52
commit 2e7ae7b763
7 changed files with 64 additions and 19 deletions
+7
View File
@@ -0,0 +1,7 @@
from rest_framework import serializers
from .models import Song
class SongSerialzer(serializers.ModelSerializer):
class Meta:
model = Song
fields = ('id', 'title', 'albumn', 'year', 'genre', 'track_number', 'file')