from the documentation:
read_only Set this to True to ensure that the field is used when serializing a representation, but is not used when updating
In case somebody lands here with a similar issue, pay attention to the following attributes along with required:
allow_blank:
If set to
Truethen the empty string should be considered a valid value.
allow_null:
Normally an error will be raised if
Noneis passed to a serializer field.
required:
Normally an error will be raised if a field is not supplied during deserialization.
I was straggling to figure out why I was getting a validation error with required=False where I had missed the allow_null attribute.