show disabled property in editor api
This commit is contained in:
parent
0cc344fe48
commit
6e5d403527
1 changed files with 2 additions and 0 deletions
|
@ -182,6 +182,8 @@ class APIHybridFormTemplateResponse(APIHybridResponse):
|
||||||
}
|
}
|
||||||
if hasattr(widget, 'choices'):
|
if hasattr(widget, 'choices'):
|
||||||
field['choices'] = dict(widget.choices)
|
field['choices'] = dict(widget.choices)
|
||||||
|
if hasattr(widget, 'disabled'):
|
||||||
|
field['disabled'] = True
|
||||||
field.update(widget.attrs)
|
field.update(widget.attrs)
|
||||||
field.update({
|
field.update({
|
||||||
'value': self.form[name].value(),
|
'value': self.form[name].value(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue