2
Try to use something like:
class CustomSerializer(serializers.Serializer):
comment = serializers.CharField(required=True)
mymodel = serializers.ChoiceField(choices=list(MyModel.objects.all().values_list('id', flat=True)))
Source:stackexchange.com