#31722: RangeWidget produces 1 subwidget, itself
-------------------------------------+-------------------------------------
Reporter: Ryan | Owner: nobody
Heard |
Type: | Status: new
Uncategorized |
Component: | Version: 3.0
Uncategorized | Keywords: MultiWidget
Severity: Normal | RangeWidget Widget
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
The RangeWidget cannot be iterated over correctly, as it returns a list of
itself for it's subwidgets.
{{{
{% for subwidget in form.date_range.subwidgets %}
{{ forloop.counter }}
{{ subwidget }}
{% endfor %}
}}}
I would expect that to output "1" then the start widget, then "2" then the
end widget. However it only prints "1" and then both widgets, since the
subwidget is really the current widget.
--
Ticket URL: <https://code.djangoproject.com/ticket/31722>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/049.9f88204ab0de0d7b65278d38c87e7fb4%40djangoproject.com.