from playlist.models import Artist
from rest_framework import serializers

class ArtistSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = Artist
        fields = ['id', 'name', 'url']
        extra_kwargs = {
            'url': {'view_name': 'api-artist', 'lookup_field': 'id'},
        }
