Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to set required drf serialzier

class MySerializer(serializer.Modelserializer):
	class Meta:
    	model = MyModel
        fields = ['id', 'title']
        
	extra_kwargs = {
		"title": {"required": False}
	}
 
PREVIOUS NEXT
Tagged: #set #required #drf #serialzier
ADD COMMENT
Topic
Name
4+8 =