from rest_framework import serializers
from .models import Animal

class AnimalSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = Animal
        fields = ('id', 'name', 'dob', 'gender', 'active', 'own', 'father', 'mother')
from rest_framework import serializers
from .models import Animal

class AnimalSerializer(serializers.ModelSerializer):
    class Meta:
        model = Animal
        fields = ('id', 'name', 'dob', 'gender', 'active', 'own', 'father', 'mother')
Change sanitizer to normal model sanitizer, so it sends ids of parents.
Change sanitizer to normal model sanitizer, so it sends ids of parents.
