Fixed #28890 -- Removed newlines between MultiWidget's subwidgets.

Regression in b52c73008a.
This commit is contained in:
Nick Pope 2017-12-05 14:42:10 +00:00 committed by Tim Graham
parent dfeb19121b
commit e014f91a70
5 changed files with 13 additions and 4 deletions

View File

@ -1 +1 @@
{% for widget in widget.subwidgets %}{% include widget.template_name %}{% endfor %} {% for widget in widget.subwidgets -%}{% include widget.template_name %}{%- endfor %}

View File

@ -1 +1 @@
{% for widget in widget.subwidgets %}{% include widget.template_name %}{% endfor %} {% spaceless %}{% for widget in widget.subwidgets %}{% include widget.template_name %}{% endfor %}{% endspaceless %}

View File

@ -9,4 +9,5 @@ Django 1.11.9 fixes several bugs in 1.11.8.
Bugfixes Bugfixes
======== ========
* ... * Fixed a regression in Django 1.11 that added newlines between ``MultiWidget``'s
subwidgets (:ticket:`28890`).

View File

@ -9,4 +9,5 @@ Django 2.0.1 fixes several bugs in 2.0.
Bugfixes Bugfixes
======== ========
* ... * Fixed a regression in Django 1.11 that added newlines between ``MultiWidget``'s
subwidgets (:ticket:`28890`).

View File

@ -166,6 +166,13 @@ class MultiWidgetTest(WidgetTest):
""" """
)) ))
def test_no_whitespace_between_widgets(self):
widget = MyMultiWidget(widgets=(TextInput, TextInput()))
self.check_html(widget, 'code', None, html=(
'<input type="text" name="code_0" />'
'<input type="text" name="code_1" />'
), strict=True)
def test_deepcopy(self): def test_deepcopy(self):
""" """
MultiWidget should define __deepcopy__() (#12048). MultiWidget should define __deepcopy__() (#12048).