#27496: Iterating over ModelChoiceField with RadioSelect widget duplicates query
------------------------+--------------------------------------
Reporter: a-p-f | Owner: nobody
Type: Bug | Status: closed
Component: Forms | Version: 1.10
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------+--------------------------------------
Comment (by a-p-f):
Replying to [comment:1 Tim Graham]:
> Looks like a duplicate of #27002 which will be fixed in 1.11.
Actually, I believe this is a separate (but related) issue. That ticket
indicates that the query is executed twice when rendering the widget
normally. This issue is specific to iterating over the field, which causes
the query to be executed 2n + 5 times.
I tried applying the patch which fixes #27002. Now the query is executed
2n times, instead of 2n + 5.
--
Ticket URL: <https://code.djangoproject.com/ticket/27496#comment:2>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.8c0be08a4cb07d7a17cea615ef9b95ae%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.