django-rest-framework/rest_framework/utils
rizwanshaikh 7a9db57eaf
Propagate 'default' from model_field to serializer field. (#9030)
* Propagate 'default' from model_field to serializer field

Fix #7469.

Co-authored-by: Nikhil Benesch <nikhil.benesch@gmail.com>

* updated field default on serializer according to openapi generation and added that to options action response

* added notes regarding default value propagation from model to serializer field

* updated note

* Update docs/api-guide/fields.md

* Update docs/api-guide/fields.md

* Update docs/api-guide/fields.md

* Update docs/api-guide/fields.md

* Update docs/api-guide/fields.md

* Update docs/api-guide/fields.md

---------

Co-authored-by: John Parton <john.parton.iv@gmail.com>
Co-authored-by: Nikhil Benesch <nikhil.benesch@gmail.com>
Co-authored-by: Rizwan Shaikh <rshaikh@ces-ltd.com>
Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
2023-08-07 12:35:54 +06:00
..
__init__.py XML cleanup 2013-02-22 19:46:47 +00:00
breadcrumbs.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
encoders.py Fix OpenAPI Schema yaml rendering for timedelta (#9007) 2023-06-17 09:18:25 +06:00
field_mapping.py Propagate 'default' from model_field to serializer field. (#9030) 2023-08-07 12:35:54 +06:00
formatting.py replace force_text with force_str 2019-08-07 21:05:24 +02:00
html.py Ensure that html forms (multipart form data) respect optional fields (#5927) 2018-04-20 15:11:52 +02:00
humanize_datetime.py Change ISO 8601 date format to exclude year/month (#5936) 2018-04-14 05:23:31 +01:00
json.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
mediatypes.py Replaced parse_header with parse_header_parameters. (#8556) 2022-07-14 14:20:36 +02:00
model_meta.py Replaced OrderedDict with dict (#8964) 2023-04-30 15:20:02 +06:00
representation.py replace force_text with force_str 2019-08-07 21:05:24 +02:00
serializer_helpers.py Replaced OrderedDict with dict (#8964) 2023-04-30 15:20:02 +06:00
timezone.py Use ZoneInfo as primary source of timezone data (#8924) 2023-04-08 15:16:00 +06:00
urls.py Remove unnecessary type conversions (#7526) 2020-09-08 15:42:01 +01:00