This commit is contained in:
Adam Duren 2017-05-12 15:43:02 +00:00 committed by GitHub
commit 753c8c157b
2 changed files with 6 additions and 2 deletions

View File

@ -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:

View File

@ -143,10 +143,12 @@ class TestMetadata:
'required': True,
'read_only': False,
'label': 'List field',
'initial': '[]',
'child': {
'type': 'list',
'required': True,
'read_only': False,
'initial': '[]',
'child': {
'type': 'integer',
'required': True,
@ -355,7 +357,8 @@ class TestModelSerializerMetadata(TestCase):
'type': 'field',
'required': False,
'read_only': True,
'label': 'Children'
'label': 'Children',
'initial': '[]',
},
'integer_field': {
'type': 'integer',