* ui_ux: => 0
* easy: => 0
Comment:
this comes up all the time for me. I use this nasty widget that I made:
http://skyl.org/log/post/skyl/2011/01/wherein-the-inner-workings-of-the-
deathstarwidget-are-revealed/
--
Ticket URL: <https://code.djangoproject.com/ticket/9230#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by skyl):
I have been told that this works: http://djangosnippets.org/snippets/2159/
--
Ticket URL: <https://code.djangoproject.com/ticket/9230#comment:12>
* status: new => closed
* cc: bmispelon@… (added)
* resolution: => duplicate
Comment:
Unless I'm mistaken, this is a duplicate of #4592.
--
Ticket URL: <https://code.djangoproject.com/ticket/9230#comment:13>
Comment (by gabn88):
This is my first post here, so sorry if I'm doing it wrong.
I'm trying to iterate over my checkboxes (using Django 1.7.7) where I'm
using an ModelFormSet to generate multiple forms.
My original code is:
{{{
{%if field.name == "repeat_weekday" %}
<td>{{field}}<td>
{% endif %}
}}}
Now I have made:
{{{
{% for choice, choice_label in field.field.widget.choices %}
<td> <input checked={{choice.checked}}
id="id_form-0-repeat_weekday_0" name="form-0-repeat_weekday"
type="checkbox" value="{{ choice }}"> {{choice_label}} </td>
{% endfor %}
}}}
but I don't know how to find the = checked and id and name via the field.
Easier would IMO be to do something like the thing below (and I would say
that would be a genuine fix of the issue in this ticket):
{{{
{% for checkbox, label in field.checkboxes %}
{{ checkbox }} <!-- Renders the checkbox completely
{{ label }} <!-- Renders the label completely
{% endfor %}
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/9230#comment:14>
* status: closed => new
* resolution: duplicate =>
--
Ticket URL: <https://code.djangoproject.com/ticket/9230#comment:15>
* status: new => closed
* resolution: => duplicate
Comment:
Hi,
The best place to go for questions like these would rather be the django-
users mailing list: https://groups.google.com/forum/#!forum/django-users.
Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/9230#comment:16>
Comment (by Claude Paroz <claude@…>):
In [changeset:"97e1160be51e4dfdf35e6ba9d93eff5a52bccbe3" 97e1160]:
{{{
#!CommitTicketReference repository=""
revision="97e1160be51e4dfdf35e6ba9d93eff5a52bccbe3"
Refs #9230 -- Added complementary tests for widget iterations
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/9230#comment:17>