summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-01-28 13:49:51 -0500
committerTim Graham <timograham@gmail.com>2016-01-28 18:43:48 -0500
commit04564eb74d2d92eaf88b22ab8cec7ef45978111e (patch)
tree8dd1e962987d77af72557d00969c00e832c42a15 /django/forms
parent4b0118465b485e068a8d9ead2384fcc2ac741f06 (diff)
Fixed #26129 -- Made invalid forms display initial values of disabled fields.
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/fields.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/forms/fields.py b/django/forms/fields.py
index 2facb74b1d..3ad362b9b8 100644
--- a/django/forms/fields.py
+++ b/django/forms/fields.py
@@ -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):