from rest_framework import serializers from right_tree.api.models import Plant class PlantSerializer(serializers.HyperlinkedModelSerializer): id = serializers.ReadOnlyField() class Meta: model = Plant fields = ['id', 'name']