drf-writable-nested icon indicating copy to clipboard operation
drf-writable-nested copied to clipboard

Adding meta options for relations

Open stygmate opened this issue 6 years ago • 3 comments
trafficstars

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 avatar Jul 02 '19 07:07 stygmate

@ruscoder is it simple to add ?

stygmate avatar Jul 02 '19 14:07 stygmate

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

ruscoder avatar Jul 30 '19 17:07 ruscoder

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.

csdenboer avatar Jul 31 '19 14:07 csdenboer