Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Refs #29984 -- Made QuerySet.iterator() without chunk_size raise ValueError ↵ | Mariusz Felisiak | 2023-01-17 | 1 | -19/+5 |
| | | | | | | after prefetch_related(). Per deprecation timeline. | ||||
* | Removed unnecessary commas in tests. | Mariusz Felisiak | 2022-12-21 | 1 | -2/+2 |
| | |||||
* | Fixed #33984 -- Reverted "Fixed #32980 -- Made models cache related managers." | Mariusz Felisiak | 2022-09-30 | 1 | -8/+0 |
| | | | | | | | | This reverts 4f8c7fd9d91b35e2c2922de4bb50c8c8066cbbc6 and adds two regression tests: - test_related_manager_refresh(), and - test_create_copy_with_m2m(). Thanks joeli for the report. | ||||
* | Refs #26780 -- Made prefetch_related() don't use window expressions fo ↵ | Mariusz Felisiak | 2022-09-06 | 1 | -2/+21 |
| | | | | sliced queries if not supported. | ||||
* | Fixed #26780 -- Added prefetch_related() support for sliced queries. | Simon Charette | 2022-08-15 | 1 | -0/+64 |
| | | | | | This was made possible by window function filtering support added in f387d024fc75569d2a4a338bfda76cc2f328f627. | ||||
* | Relaxed some query ordering assertions in various tests. | Mariusz Felisiak | 2022-04-14 | 1 | -1/+1 |
| | | | It accounts for differences seen on MySQL with MyISAM storage engine. | ||||
* | Removed redundant QuerySet.all() calls in docs and tests. | Nick Pope | 2022-02-22 | 1 | -31/+21 |
| | | | | Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager. | ||||
* | Refs #33476 -- Refactored code to strictly match 88 characters line length. | Mariusz Felisiak | 2022-02-07 | 2 | -4/+8 |
| | |||||
* | Refs #33476 -- Reformatted code with Black. | django-bot | 2022-02-07 | 4 | -649/+947 |
| | |||||
* | Refs #33476 -- Refactored problematic code before reformatting by Black. | Mariusz Felisiak | 2022-02-03 | 1 | -10/+12 |
| | | | | | | | | | | | | | | | | | In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], ) | ||||
* | Fixed #29984 -- Added QuerySet.iterator() support for prefetching related ↵ | Jacob Walls | 2022-01-25 | 1 | -1/+34 |
| | | | | | | | objects. Co-authored-by: Raphael Kimmig <raphael.kimmig@ampad.de> Co-authored-by: Simon Charette <charette.s@gmail.com> | ||||
* | Fixed #32511 -- Corrected handling prefetched nested reverse relationships. | Jamie Matthews | 2022-01-05 | 1 | -0/+26 |
| | | | | | | | | | | When prefetching a set of child objects related to a set of parent objects, we usually want to populate the relationship back from the child to the parent to avoid a query when accessing that relationship attribute. However, there's an edge case where the child queryset itself specifies a prefetch back to the parent. In that case, we want to use the prefetched relationship rather than populating the reverse relationship from the parent. | ||||
* | Fixed #32980 -- Made models cache related managers. | Keryn Knight | 2021-11-08 | 1 | -0/+8 |
| | |||||
* | Fixed #33008 -- Fixed prefetch_related() for deleted GenericForeignKeys. | Martin Svoboda | 2021-10-14 | 1 | -0/+18 |
| | | | | Thanks Simon Charette for the implementation idea. | ||||
* | Fixed #32812 -- Restored immutability of named values from ↵ | Takayuki Hirayama | 2021-06-04 | 1 | -0/+7 |
| | | | | | | | | QuerySet.values_list(). Regression in 981a072dd4dec586f8fc606712ed9a2ef116eeee. Thanks pirelle for the report. | ||||
* | Fixed #32089 -- Fixed prefetch_related_objects() when some objects are ↵ | Alexey Nigin | 2020-12-16 | 1 | -0/+26 |
| | | | | | | | | | already fetched. Thanks Dennis Kliban for the report and Adam Johnson for the initial patch. Co-authored-by: Adam Johnson <me@adamj.eu> | ||||
* | Fixed #31235 -- Made assertQuerysetEqual() compare querysets directly. | Hasan Ramezani | 2020-11-06 | 1 | -2/+2 |
| | | | | | | | | This also replaces assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() where appropriate. Co-authored-by: Peter Inglesby <peter.inglesby@gmail.com> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> | ||||
* | Refs #20577 -- Deferred filtering of prefetched related querysets by reverse ↵ | Bob Renwick | 2020-10-06 | 1 | -9/+12 |
| | | | | m2o relation. | ||||
* | Refs #31395 -- Relied on setUpTestData() test data isolation in various tests. | Simon Charette | 2020-05-15 | 1 | -86/+88 |
| | |||||
* | Removed unused __str__() methods in tests models. | Mariusz Felisiak | 2020-04-30 | 1 | -21/+0 |
| | | | Follow up to 6461583b6cc257d25880ef9a9fd7e2125ac53ce1. | ||||
* | Simplified imports from django.db and django.contrib.gis.db. | Nick Pope | 2020-02-04 | 2 | -4/+4 |
| | |||||
* | Refs #31044 -- Fixed error message when using Prefetch with a values_list() ↵ | Mariusz Felisiak | 2019-12-09 | 1 | -2/+4 |
| | | | | queryset. | ||||
* | Fixed #31044 -- Errored nicely when using Prefetch with a raw() queryset. | Hasan Ramezani | 2019-12-09 | 1 | -1/+7 |
| | |||||
* | Fixed #20577 -- Deferred filtering of prefetched related querysets. | Alex Aktsipetrov | 2019-10-21 | 1 | -0/+31 |
| | | | | | | | Added internal interface to QuerySet that allows to defer next filter call till .query is accessed. Used it to optimize prefetch_related(). Thanks Simon Charette for the review. | ||||
* | Fixed #30651 -- Made __eq__() methods return NotImplemented for not ↵ | ElizabethU | 2019-10-01 | 1 | -0/+3 |
| | | | | | | | | | implemented comparisons. Changed __eq__ to return NotImplemented instead of False if compared to an object of the same type, as is recommended by the Python data model reference. Now these models can be compared to ANY (or other objects with __eq__ overwritten) without returning False automatically. | ||||
* | Refs #30651 -- Added tests for Prefetch.__eq__(). | Mariusz Felisiak | 2019-10-01 | 1 | -0/+6 |
| | |||||
* | Fixed typo in tests/prefetch_related/tests.py comment. | Tim Gates | 2019-08-26 | 1 | -1/+1 |
| | |||||
* | Fixed typos in test names and a comment. | Min ho Kim | 2019-08-23 | 1 | -1/+1 |
| | |||||
* | Fixed #30482 -- Prevented unnecessary evaluation of lookup.queryset in ↵ | Iain Watts | 2019-05-16 | 1 | -5/+10 |
| | | | | prefetch_related_objects(). | ||||
* | Fixed #30368 -- Fixed prefetch_related() for GenericForeignKey when PK is ↵ | Vinny Do | 2019-04-16 | 1 | -0/+7 |
| | | | | also a FK. | ||||
* | Fixed #30343 -- Fixed prefetch_related() for GenericForeignKey when PK of ↵ | Mariusz Felisiak | 2019-04-14 | 2 | -5/+19 |
| | | | | related field is UUIDField. | ||||
* | Refs #28478 -- Deprecated TestCase's allow_database_queries and multi_db in ↵ | Simon Charette | 2019-01-10 | 1 | -1/+1 |
| | | | | favor of databases. | ||||
* | Followed style guide for model attribute ordering. | Matt Wiens | 2018-12-27 | 1 | -21/+21 |
| | |||||
* | Fixed #29230 -- Fixed nested prefetches that clash with descriptors. | Paulo | 2018-05-27 | 1 | -0/+13 |
| | |||||
* | Fixed #28600 -- Added prefetch_related() support to RawQuerySet. | Adnan Umer | 2018-04-19 | 1 | -1/+35 |
| | |||||
* | Refs #28723 -- Fixed stale prefetch_related cache after add/remove. | Jon Dufresne | 2018-02-05 | 2 | -1/+17 |
| | | | Regression in 514b2c989a948e3c59bda0da0c9427acf643cf5b. | ||||
* | Made prefetch_related tests use assertCountEqual() for unordered sequences. | Jon Dufresne | 2018-02-05 | 1 | -5/+5 |
| | |||||
* | Fixed #28723 -- Fixed RelatedManager's prefetch_related() cache name. | Mike Hansen | 2017-11-02 | 1 | -1/+11 |
| | |||||
* | Fixed #28375 -- Fixed KeyError crash on reverse prefetch of a model with ↵ | Paulo | 2017-08-21 | 2 | -1/+23 |
| | | | | OneToOneField primary key to a non-pk field. | ||||
* | Used assertRaisesMessage() to test Django's error messages. | Mads Jensen | 2017-07-29 | 1 | -4/+20 |
| | |||||
* | Refs #23968 -- Removed unnecessary lists, generators, and tuple calls. | Jon Dufresne | 2017-06-01 | 1 | -1/+1 |
| | |||||
* | Sorted imports per isort 4.2.9. | Tim Graham | 2017-06-01 | 1 | -2/+0 |
| | |||||
* | Refs #25546 -- Added detailed comments for prefetch_related test. | François Freitag | 2017-05-04 | 1 | -7/+17 |
| | |||||
* | Fixed #27554 -- Fixed prefetch_related() crash when fetching relations in ↵ | François Freitag | 2017-05-04 | 1 | -0/+34 |
| | | | | nested Prefetches. | ||||
* | Fixed #28096 -- Allowed prefetch calls with ModelIterable subclasses | Claude Paroz | 2017-04-19 | 2 | -2/+17 |
| | | | | | Regression in 7ec330eeb96d0874949eacb8ed1bbb97e11807e1. Thanks Tim Graham for the review. | ||||
* | Replaced type-specific assertions with assertEqual(). | Tim Graham | 2017-03-17 | 1 | -10/+10 |
| | | | Python docs say, "it's usually not necessary to invoke these methods directly." | ||||
* | Refs #23919 -- Replaced super(ClassName, self) with super(). | chillaranand | 2017-01-25 | 1 | -1/+1 |
| | |||||
* | Removed unneeded force_text calls in the test suite | Claude Paroz | 2017-01-24 | 1 | -2/+1 |
| | |||||
* | Refs #23919 -- Removed six.<various>_types usage | Claude Paroz | 2017-01-18 | 1 | -20/+19 |
| | | | | Thanks Tim Graham and Simon Charette for the reviews. | ||||
* | Refs #23919 -- Removed python_2_unicode_compatible decorator usage | Claude Paroz | 2017-01-18 | 1 | -11/+0 |
| |