I want to be able to post an id for a nested serializer field like this :
{
venue:1,
}
class VenueSerializer(serializers.ModelSerializer):
class Meta:
model = Venue
fields = '__all__'
class EventSerializer(serializers.ModelSerializer):
venue = VenueSerializer(many=False)
user = serializers.PrimaryKeyRelatedField(read_only=True, default=
serializers.CurrentUserDefault())
class Meta:
model = Event
fields = ('__all__')
I want to post an existing venue id instead of using writable nested
serializers
I get this message as the response
--
You received this message because you are subscribed to the Google Groups
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.