I am using a nested serializer. I need ProfileSerializer to return full 
related Project object for get requests and consider only id switching 
(changing current) like with relatedPrimaryField behaiviour for post/put 
requests on ProfileSerializer. any solutions on how to achieve this ?

class ProfileSerializer(serializers.ModelSerializer):
    current = ProjectSerializer()
    class Meta:
        model = Profile
        fields = ('function', 'current')

-- 
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.

Reply via email to