django1/tests/model_forms
François Freitag 3fca95e1ad Fixed #28312 -- Made ModelChoiceIterator.__len__() more memory-efficient.
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-04-23 12:39:43 -04:00
..
__init__.py
models.py Eliminated the need to modify a model forms test when new test files are added. 2018-02-28 10:26:26 -05:00
test.png
test2.png
test_modelchoicefield.py Fixed #28312 -- Made ModelChoiceIterator.__len__() more memory-efficient. 2018-04-23 12:39:43 -04:00
test_uuid.py Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
tests.py Fixed #28312 -- Made ModelChoiceIterator.__len__() more memory-efficient. 2018-04-23 12:39:43 -04:00