Reputation: 9382
While read_only_fields works flawlessly for me. Write only fields are still showing up in GET request even after doing this ->
class UserSerializer(serializers.Serializer):
class Meta:
write_only_fields = ('current_password','new_password')
It used to work till some time back in the same codebase, but seems to have broken now.
Upvotes: 4
Views: 870
Reputation: 21006
It has been removed as announced in the 3.2 release notes
You now need to use extra_kwargs
instead.
Upvotes: 5