Update fields.md

If I specify `blank=True` in my Model's field, then this field is not required in `ModelSerializer`.
BTW it's confusing since (as far as I know) `blank=True` has no effect on e.g. `ManyToManyField`, but when I'm using DRF then I have a reason to use `blank=True` on this field.
This commit is contained in:
Q_back 2020-03-06 17:42:29 +01:00 committed by GitHub
parent 4a98533746
commit 7957b81378
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,7 @@ Read-only fields are included in the API output, but should not be included in t
Set this to `True` to ensure that the field is used when serializing a representation, but is not used when creating or updating an instance during deserialization.
Defaults to `False`
Defaults to `False`. If you're using [Model Serializer](https://www.django-rest-framework.org/api-guide/serializers/#modelserializer) default value will be `False` if you have specified `blank=True` at this field.
### `write_only`