              class Meta:
                  model = BlankFieldModel
  
          class BlankFieldSerializer(serializers.Serializer):
              title = serializers.CharField(blank=True)
  
          class NotBlankFieldModelSerializer(serializers.ModelSerializer):
              class Meta:
                  model = BasicModel
  
 
</s> remove     target = serializers.SlugRelatedField(slug_field='name', null=True)
 </s> add     target = serializers.SlugRelatedField(slug_field='name', required=False) </s> remove         if model_field.has_default():
            kwargs['required'] = False
 </s> add         if has_default: </s> remove         kwargs['blank'] = model_field.blank

        if model_field.null or model_field.blank:
 </s> add         if model_field.null or model_field.blank or has_default:
            title = serializers.CharField(required=False)
              class Meta:
                  model = BlankFieldModel
  
          class BlankFieldSerializer(serializers.Serializer):
            title = serializers.CharField(required=False)
  
          class NotBlankFieldModelSerializer(serializers.ModelSerializer):
              class Meta:
                  model = BasicModel
  
keep keep keep keep replace keep keep keep keep keep
 Use new style of `required=<bool>` not `blank` or `null` 
rest_framework/tests/serializer.py