beda-software / drf-writable-nested

Writable nested model serializer for Django REST Framework
Other
1.07k stars 116 forks source link

Adding meta options for relations #84

Open stygmate opened 5 years ago

stygmate commented 5 years ago

Don't will be cool to have Meta options for nested serializer fields ?

I am in a particular case where the WritableNestedModelSerializer behavior is perfect for all my nested Serializers except one. On this one I do not want object creation or deletion. I only want certain fields to be updatable.

stygmate commented 5 years ago

@ruscoder is it simple to add ?

ruscoder commented 5 years ago

Hello @stygmate. Could you please provide an example with some code where do you need this behaviour?

csdenboer commented 5 years ago

It would indeed to be nice to make separate mixins for update and delete (both for 'semantic' and functional reasons), not an UPDATEModelMixin that also deletes relations.