from pickle import BUILD from playlist import serializers from rest_framework.views import APIView from rest_framework.response import Response from playlist.serializers import ProfileSerializer, ProfileUpdateSerializer, BackgroundSerializer from playlist.models import Profile, Background class ProfileMeView(APIView): def get(self, request): profile = request.user.profile serializer = ProfileSerializer(profile) return Response(serializer.data)