| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2022-04-14 | Relaxed some query ordering assertions in various tests. | Mariusz Felisiak | |
| It accounts for differences seen on MySQL with MyISAM storage engine. | |||
| 2022-02-07 | Refs #33476 -- Refactored code to strictly match 88 characters line length. | Mariusz Felisiak | |
| 2022-02-07 | Refs #33476 -- Reformatted code with Black. | django-bot | |
| 2021-09-30 | Fixed #33155 -- Made ModelChoiceIteratorValue instances hashable. | Aljaž Košir | |
| 2021-08-27 | Refs #32338 -- Made RadioSelect/CheckboxSelectMultiple render in <div> tags. | David Smith | |
| This improves accessibility for screen reader users. | |||
| 2020-04-28 | Changed django.forms.ValidationError imports to ↵ | François Freitag | |
| django.core.exceptions.ValidationError. Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com> | |||
| 2020-02-05 | Fixed #26813 -- Prevented empty choice in ModelChoiceField with RadioSelect ↵ | Hasan Ramezani | |
| for fields with blank=False. | |||
| 2019-12-23 | Fixed #30998 -- Added ModelChoiceIteratorValue to pass the model instance to ↵ | Jon Dufresne | |
| ChoiceWidget.create_option(). | |||
| 2019-12-11 | Fixed typo in ModelChoiceFieldTests. | Jon Dufresne | |
| The subindex and attrs arguments should be passed through to the parent, not overridden as None. | |||
| 2019-10-11 | Fixed #30014 -- Fixed ModelChoiceField validation when initial value is a ↵ | Etienne Chové | |
| model instance. Thanks Carlton Gibson for reviews. | |||
| 2019-10-11 | Added ModelChoiceField test for validation with to_field_name. | Etienne Chové | |
| 2018-04-23 | Refs #28312 -- Added an optimized __bool__() to ModelChoiceIterator. | François Freitag | |
| COUNT is more expensive than EXISTS; use the latter when possible. | |||
| 2018-04-23 | Fixed #28312 -- Made ModelChoiceIterator.__len__() more memory-efficient. | François Freitag | |
| Instead of loading all QuerySet results in memory, count the number of entries. This adds an extra query when list() or tuple() is called on the choices (because both call __len__() then __iter__()) but uses less memory since the QuerySet results won't be cached. In most cases, the choices will only be iterated on, meaning that __len__() won't be called and only one query will be executed. | |||
| 2018-03-01 | Fixed #29159 -- Made ModelChoiceIterator reuse QuerySet result cache. | François Freitag | |
| When __len__() is called (e.g. when casting to list or tuple), the QuerySet is evaluated and the result cache populated. iterator() shouldn't be called on the QuerySet after that, as it would reset the result cache and trigger a second query. | |||
| 2018-03-01 | Fixed #29158 -- Fixed len(choices) crash if ModelChoiceField's queryset is a ↵ | François Freitag | |
| manager. Removing all() in __iter__() prevents a duplicate query when choices are cast to a list and there's a prefetch_related(). | |||
| 2018-03-01 | Consolidated ModelChoiceField tests. | François Freitag | |
