show disabled property in editor api

This commit is contained in:
Laura Klünder 2018-11-22 19:20:21 +01:00
parent 0cc344fe48
commit 6e5d403527

View file

@ -182,6 +182,8 @@ class APIHybridFormTemplateResponse(APIHybridResponse):
}
if hasattr(widget, 'choices'):
field['choices'] = dict(widget.choices)
if hasattr(widget, 'disabled'):
field['disabled'] = True
field.update(widget.attrs)
field.update({
'value': self.form[name].value(),