1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.11.x] Fixed #28387 -- Fixed has_changed() for disabled form fields that subclass it.

Backport of 5debbdfcc8 from master
This commit is contained in:
Srinivas Reddy Thatiparthy
2017-07-13 20:25:32 +05:30
committed by Tim Graham
parent fc6b90bdb7
commit a3b5df8ed5
8 changed files with 40 additions and 0 deletions

View File

@@ -103,6 +103,10 @@ class MultiValueFieldTest(SimpleTestCase):
['some text', ['J', 'P'], ['2009-04-25', '11:44:00']],
))
def test_disabled_has_changed(self):
f = MultiValueField(fields=(CharField(), CharField()), disabled=True)
self.assertIs(f.has_changed(['x', 'x'], ['y', 'y']), False)
def test_form_as_table(self):
form = ComplexFieldForm()
self.assertHTMLEqual(