[Django] #29200: RadioSelect does not render its label in MultiWidget

10 views
Skip to first unread message

Django

unread,
Mar 7, 2018, 8:47:12 PM3/7/18
to django-...@googlegroups.com
#29200: RadioSelect does not render its label in MultiWidget
------------------------------------------+------------------------
Reporter: Takayuki Hirai | Owner: nobody
Type: Uncategorized | Status: new
Component: Forms | Version: 1.11
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
The code:

{{{
#!python
from django import forms


class MyWidget(forms.MultiWidget):
def __init__(self):
widgets = [
forms.RadioSelect(
choices=[('aaa', 'bbb')]
)
]
super(MyWidget, self).__init__(
widgets=widgets,
attrs={},
)

def decompress(self, v):
return []


print(MyWidget().render('wname', None))
}}}

Actual output:

{{{
<ul>
<li><input type="radio" name="wname_0" value="aaa" />


</li>
</ul>
}}}

Expected output:

{{{
<ul>
<li><label><input type="radio" name="wname_0" value="aaa" />
bbb</label>

</li>
</ul>
}}}

It seems that this problem is caused by the following reasons:

- a template of {{{RadioSelect}}} requires {{{wrap_label}}} context
varialbe to render LABEL elements
- {{{MultiWidget.get_context()}}} drops {{{wrap_label}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29200>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 9, 2018, 12:28:01 AM3/9/18
to django-...@googlegroups.com
#29200: RadioSelect does not render its label in MultiWidget
--------------------------------+--------------------------------------

Reporter: Takayuki Hirai | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.11
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by Takayuki Hirai):

* type: Uncategorized => Bug


--
Ticket URL: <https://code.djangoproject.com/ticket/29200#comment:1>

Django

unread,
Mar 14, 2018, 10:32:04 AM3/14/18
to django-...@googlegroups.com
#29200: RadioSelect does not render its label in MultiWidget
--------------------------------+------------------------------------

Reporter: Takayuki Hirai | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted


Comment:

That's a regression in b52c73008a9d67e9ddbb841872dc15cdd3d6ee01.

--
Ticket URL: <https://code.djangoproject.com/ticket/29200#comment:2>

Django

unread,
Mar 14, 2018, 10:48:52 AM3/14/18
to django-...@googlegroups.com
#29200: RadioSelect does not render its label in MultiWidget
--------------------------------+--------------------------------------
Reporter: Takayuki Hirai | Owner: Tim Graham
Type: Bug | Status: assigned
Component: Forms | Version: 1.11

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by Tim Graham):

* owner: nobody => Tim Graham
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/29200#comment:3>

Django

unread,
Mar 14, 2018, 11:58:13 AM3/14/18
to django-...@googlegroups.com
#29200: RadioSelect does not render its label in MultiWidget
--------------------------------+--------------------------------------
Reporter: Takayuki Hirai | Owner: Tim Graham
Type: Bug | Status: assigned
Component: Forms | Version: 1.11

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by Tim Graham):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/9782 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/29200#comment:4>

Django

unread,
Mar 15, 2018, 3:51:37 AM3/15/18
to django-...@googlegroups.com
#29200: RadioSelect does not render its label in MultiWidget
-------------------------------------+-------------------------------------

Reporter: Takayuki Hirai | Owner: Tim
| Graham
Type: Bug | Status: assigned
Component: Forms | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/29200#comment:5>

Django

unread,
Mar 15, 2018, 9:52:41 AM3/15/18
to django-...@googlegroups.com
#29200: RadioSelect does not render its label in MultiWidget
-------------------------------------+-------------------------------------
Reporter: Takayuki Hirai | Owner: Tim
| Graham
Type: Bug | Status: closed
Component: Forms | Version: 1.11
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"87dc0844a634360182bcb74d491508111ef8a652" 87dc0844]:
{{{
#!CommitTicketReference repository=""
revision="87dc0844a634360182bcb74d491508111ef8a652"
Fixed #29200 -- Fixed label rendering when using RadioSelect and
CheckboxSelectMultiple with MultiWidget.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29200#comment:6>

Django

unread,
Mar 25, 2018, 11:47:55 AM3/25/18
to django-...@googlegroups.com
#29200: RadioSelect does not render its label in MultiWidget
-------------------------------------+-------------------------------------
Reporter: Takayuki Hirai | Owner: Tim
| Graham
Type: Bug | Status: closed
Component: Forms | Version: 1.11

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by karyon):

there's no backport to 2.0.x, is that intended?

--
Ticket URL: <https://code.djangoproject.com/ticket/29200#comment:7>

Django

unread,
Mar 25, 2018, 11:55:29 AM3/25/18
to django-...@googlegroups.com
#29200: RadioSelect does not render its label in MultiWidget
-------------------------------------+-------------------------------------
Reporter: Takayuki Hirai | Owner: Tim
| Graham
Type: Bug | Status: closed
Component: Forms | Version: 1.11

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

Yes, it doesn't qualify for a backport based on the
[https://docs.djangoproject.com/en/dev/internals/release-process
/#supported-versions supported versions policy]

--
Ticket URL: <https://code.djangoproject.com/ticket/29200#comment:8>

Reply all
Reply to author
Forward
0 new messages