diff --git a/django/forms/widgets.py b/django/forms/widgets.py index 00c19e2c55..386b0e7c3f 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -849,9 +849,7 @@ class MultiWidget(Widget): return context def id_for_label(self, id_): - if id_: - id_ += '_0' - return id_ + return '' def value_from_datadict(self, data, files, name): return [ diff --git a/tests/forms_tests/field_tests/test_multivaluefield.py b/tests/forms_tests/field_tests/test_multivaluefield.py index 22e0892f68..449bf16d19 100644 --- a/tests/forms_tests/field_tests/test_multivaluefield.py +++ b/tests/forms_tests/field_tests/test_multivaluefield.py @@ -141,7 +141,7 @@ class MultiValueFieldTest(SimpleTestCase): self.assertHTMLEqual( form.as_table(), """ - + ' + '' + '', + ) diff --git a/tests/postgres_tests/test_ranges.py b/tests/postgres_tests/test_ranges.py index 57704efaa4..c2f9d443dd 100644 --- a/tests/postgres_tests/test_ranges.py +++ b/tests/postgres_tests/test_ranges.py @@ -665,7 +665,7 @@ class TestFormField(PostgreSQLSimpleTestCase): self.assertHTMLEqual(str(form), ''' - + @@ -700,7 +700,7 @@ class TestFormField(PostgreSQLSimpleTestCase): form.as_table(), """ - + @@ -717,7 +717,7 @@ class TestFormField(PostgreSQLSimpleTestCase): form.as_table(), """ - + @@ -754,7 +754,7 @@ class TestFormField(PostgreSQLSimpleTestCase): self.assertHTMLEqual(str(RangeForm()), ''' - +