I have a question regarding, shall I say, policy regarding where
attributes are placed on widgets (and MultiWidgets) that are rendered
as more than one HTML input.
Should what's passed in attrs be put on the individual inputs, or on
one encapsulating element (such as a div or an ul).
My question is sparked by a problem we have with
newforms.widgets.RadioSelect. Currently, it will render itself as a
<p>, followed by a <ul> of radio inputs (this is if you as_p on the
<p><label for="id_x">Option:</label> </p>
<input value="A" name="x" id="id_x_0" type="radio"> Option A
<input value="B" name="x" id="id_x_1" type="radio"> Option B
We need to be able to add a stylesheet to set the list-style for that
list (so list items do not get bullets, which is otherwise the
To do that we need to add a class attribute to the ul (See ticket
#4080 - thought it to be a bug). In the meantime, however, ticket
#3870 implemented things differently.
I need to know whether #3870 is correct (from a design perspective) in
its assumption that the args you pass to a widget should be applied to
all its "constituent parts"? I think it makes more sense to give it a
div or something and apply the args to one conceptual thing...
One way or another, I'd like to know what changes we can suggest to
fix the problem of being able to style the ul of a RadioSelect...