mirror of https://github.com/django/django.git
[2.0.x] Fixed #28890 -- Removed newlines between MultiWidget's subwidgets.
Regression inb52c73008a
. Backport ofe014f91a70
from master
This commit is contained in:
parent
e71f4e8632
commit
c1d57615ac
|
@ -1 +1 @@
|
|||
{% for widget in widget.subwidgets %}{% include widget.template_name %}{% endfor %}
|
||||
{% for widget in widget.subwidgets -%}{% include widget.template_name %}{%- endfor %}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{% for widget in widget.subwidgets %}{% include widget.template_name %}{% endfor %}
|
||||
{% spaceless %}{% for widget in widget.subwidgets %}{% include widget.template_name %}{% endfor %}{% endspaceless %}
|
||||
|
|
|
@ -9,4 +9,5 @@ Django 1.11.9 fixes several bugs in 1.11.8.
|
|||
Bugfixes
|
||||
========
|
||||
|
||||
* ...
|
||||
* Fixed a regression in Django 1.11 that added newlines between ``MultiWidget``'s
|
||||
subwidgets (:ticket:`28890`).
|
||||
|
|
|
@ -9,4 +9,5 @@ Django 2.0.1 fixes several bugs in 2.0.
|
|||
Bugfixes
|
||||
========
|
||||
|
||||
* ...
|
||||
* Fixed a regression in Django 1.11 that added newlines between ``MultiWidget``'s
|
||||
subwidgets (:ticket:`28890`).
|
||||
|
|
|
@ -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):
|
||||
"""
|
||||
MultiWidget should define __deepcopy__() (#12048).
|
||||
|
|
Loading…
Reference in New Issue