Hello this is my first question here. I am beginner and i am making my first API in DRF. I am familiar with the MVT(MDC) model of django. My question is very simple but their is no good documentation for DRF to understand many things. What is the purpose of the get_validation_exclusions function in the this Serializer ?Do you know where i can find a very detailed documentation for DRF ?
class PostSerializer(serializers.ModelSerializer):
author = UserSerializer(required=False)
photos = serializers.HyperlinkedIdentityField('photos', view_name='postphoto-list')
# author = serializers.HyperlinkedRelatedField(view_name='user-detail', lookup_field='username')
def get_validation_exclusions(self):
# Need to exclude `author` since we'll add that later based off the request
exclusions = super(PostSerializer, self).get_validation_exclusions()
return exclusions + ['author']
class Meta:
model = Post