1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Fixed #26129 -- Made invalid forms display initial values of disabled fields.

This commit is contained in:
Tim Graham
2016-01-28 13:49:51 -05:00
parent 4b0118465b
commit 04564eb74d
3 changed files with 13 additions and 0 deletions

View File

@@ -167,6 +167,8 @@ class Field(object):
For most fields, this will simply be data; FileFields need to handle it
a bit differently.
"""
if self.disabled:
return initial
return data
def widget_attrs(self, widget):