mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 13:00:12 +03:00
Include 'initial' attribute of serializer fields in metadata responses
Frontend applications may now use the response of an OPTIONS request so as to populate the fields for "add/new/create" type of forms with initial values based on the 'initial' attribute of the serializer's fields.
This commit is contained in:
parent
00ead782d4
commit
fc0ec571c2
|
@ -124,7 +124,8 @@ class SimpleMetadata(BaseMetadata):
|
|||
attrs = [
|
||||
'read_only', 'label', 'help_text',
|
||||
'min_length', 'max_length',
|
||||
'min_value', 'max_value'
|
||||
'min_value', 'max_value',
|
||||
'initial'
|
||||
]
|
||||
|
||||
for attr in attrs:
|
||||
|
|
Loading…
Reference in New Issue
Block a user