summaryrefslogtreecommitdiff
path: root/tests/defer
AgeCommit message (Collapse)Author
2026-04-18Fixed #37036 -- Added missing flat=True arg in DeferredAttribute.fetch_many().garybadwal
2026-01-13Fixed #35442 -- Prevented N+1 queries in RelatedManager with only().Samriddha9619
Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-10-16Fixed #28586 -- Added model field fetch modes.Adam Johnson
May your database queries be much reduced with minimal effort. co-authored-by: Andreas Pelme <andreas@pelme.se> co-authored-by: Simon Charette <charette.s@gmail.com> co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2024-12-02Fixed #35950 -- Restored refreshing of relations when fields deferred.Adam Johnson
Thank you to Simon Charette and Sarah Boyce for the review. Regression in 73df8b54a2fab53bec4c7573cda5ad8c869c2fd8.
2024-03-08Fixed #35044 -- Avoided clearing reverse relations and private fields when ↵Giannis Terzopoulos
accessing deferred fields. Regression in a7b5ad8b19a08d7d57302ece74f6e26d2887fd9f for reverse relations and possibly in 123b1d3fcf79f091573c40be6da7113a6ef35b62 for private fields.
2023-04-05Fixed #34458 -- Fixed QuerySet.defer() crash on attribute names.Simon Charette
Thanks Andrew Cordery for the report. Regression in b3db6c8dcb5145f7d45eff517bcd96460475c879.
2022-10-08Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵Gregor Gärtner
assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com>
2022-08-30Fixed #21204 -- Tracked field deferrals by field instead of models.Simon Charette
This ensures field deferral works properly when a model is involved more than once in the same query with a distinct deferral mask.
2022-08-30Refs #21204 -- Added more QuerySet.defer()/only() tests for invalid fields.Simon Charette
2022-02-22Removed redundant QuerySet.all() calls in docs and tests.Nick Pope
Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-07-20Fixed #32704 -- Fixed list of deferred fields when chaining QuerySet.defer() ↵David Wobrock
after only().
2021-07-20Added more tests for chaining QuerySet.defer() after only().David Wobrock
2021-06-15Fixed #30427, Fixed #16176 -- Corrected setting descriptor in ↵Carlton Gibson
Field.contribute_to_class(). Co-authored-by: Jarek Glowacki <jarekwg@gmail.com>
2019-11-18Fixed #30988 -- Deprecated the InvalidQuery exception.Simon Charette
It was barely documented without pointers at its defining location and was abused to prevent misuse of the QuerySet field deferring feature.
2019-07-19Fixed typos in comments and a test name.Min ho Kim
2019-06-25Fixed typos in test comments.Tim Gates
2018-03-16Fixed hanging indentation in various code.Mariusz Felisiak
2017-08-31Fixed #28549 -- Fixed QuerySet.defer() with super and subclass fields.Jeremy Kerr
Previously, deferring fields in different classes didn't omit the superclass' deferred field. Thanks Simon Charette for the suggested fix.
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-04-29Fixed #26207 -- Replaced dynamic classes with non-data descriptors for ↵Anssi Kääriäinen
deferred instance loading.
2016-04-13Fixed #26486 -- Fixed a select_related() + defer() MTI edge case.Tim Graham
2016-04-11Used assertRaisesMessage in a couple defer tests.Tim Graham
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-04Fixed typos of "select_related" in docs and tests.Josh Schneier
2014-12-31Refs #18586 -- Split up tests.defer.DeferTests.test_deferWill Earp
2014-11-28Fixed #901 -- Added Model.refresh_from_db() methodAnssi Kääriäinen
Thanks to github aliases dbrgn, carljm, slurms, dfunckt, and timgraham for reviews.
2014-03-03Fixed many typos in comments and docstrings.Rodolfo Carvalho
Thanks Piotr Kasprzyk for help with the patch.
2013-11-28Fixed E125 pep8 warningsChristopher Medrela
2013-11-02PEP8Jason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-10-23Fixed E225 pep8 warnings.Tim Graham
2013-08-19Made Model.__eq__ consider proxy models equivalentAnssi Kääriäinen
Fixed #11892, fixed #16458, fixed #14492.
2013-07-29Removed most of absolute_import importsClaude Paroz
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner