Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fixed #33984 -- Reverted "Fixed #32980 -- Made models cache related managers." | Mariusz Felisiak | 2022-09-30 | 1 | -0/+19 |
| | | | | | | | | This reverts 4f8c7fd9d91b35e2c2922de4bb50c8c8066cbbc6 and adds two regression tests: - test_related_manager_refresh(), and - test_create_copy_with_m2m(). Thanks joeli for the report. | ||||
* | Refs #33476 -- Refactored code to strictly match 88 characters line length. | Mariusz Felisiak | 2022-02-07 | 1 | -1/+4 |
| | |||||
* | Refs #33476 -- Reformatted code with Black. | django-bot | 2022-02-07 | 2 | -66/+100 |
| | |||||
* | Fixed 32956 -- Lowercased spelling of "web" and "web framework" where ↵ | David Smith | 2021-07-29 | 1 | -7/+7 |
| | | | | appropriate. | ||||
* | Fixed #31235 -- Made assertQuerysetEqual() compare querysets directly. | Hasan Ramezani | 2020-11-06 | 1 | -286/+145 |
| | | | | | | | | 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 #31395 -- Relied on setUpTestData() test data isolation in various tests. | Simon Charette | 2020-05-15 | 1 | -13/+14 |
| | |||||
* | Fixed #31095 -- Made RelatedManager.set() preserve existing m2m relations ↵ | Hasan Ramezani | 2019-12-19 | 1 | -0/+13 |
| | | | | with an invalid type. | ||||
* | Fixed #8467 -- Prevented crash when adding existent m2m relation with an ↵ | Simon Charette | 2019-11-22 | 1 | -1/+9 |
| | | | | | | | | | | | | | | | | | | invalid type. This was an issue anymore on backends that allows conflicts to be ignored (Refs #19544) as long the provided values were coercible to the expected type. However on the remaining backends that don't support this feature, namely Oracle, this could still result in an IntegrityError. By attempting to coerce the provided values to the expected types in Python beforehand we allow the existing value set intersection in ManyRelatedManager._get_missing_target_ids to prevent the problematic insertion attempts. Thanks Baptiste Mispelon for triaging this old ticket against the current state of the master branch. | ||||
* | Refs #8467 -- Added test for RelatedManager.add()/remove() with an invalid type. | Simon Charette | 2019-11-22 | 1 | -0/+6 |
| | |||||
* | Refs #26678 -- Added tests for using the field the relation points to with ↵ | Tobias Kunze | 2019-05-07 | 2 | -1/+42 |
| | | | | RelatedManager.add()/remove()/set(). | ||||
* | Refs #30325 -- Added tests for using count()/exists() with custom managers ↵ | Tobias Kunze | 2019-04-15 | 2 | -0/+13 |
| | | | | and reverse M2M relations. | ||||
* | Fixed #30325 -- Reverted "Fixed #29725 -- Removed unnecessary join in ↵ | Mariusz Felisiak | 2019-04-15 | 2 | -50/+2 |
| | | | | | | | QuerySet.count() and exists() on a many-to-many relation." This reverts commit 1299421cadc4fcf63585f2f88337078e43e660e0 due to a regression with custom managers. | ||||
* | Cleaned up exception message checking in some tests. | Jon Dufresne | 2019-03-15 | 1 | -1/+2 |
| | |||||
* | Refs #19544 -- Added a fast path for through additions if supported. | Simon Charette | 2019-02-21 | 1 | -2/+15 |
| | | | | | The single query insertion path is taken if the backend supports inserts that ignore conflicts and m2m_changed signals don't have to be sent. | ||||
* | Refs #19544 -- Ignored auto-created through additions conflicts if supported. | Simon Charette | 2019-02-21 | 1 | -0/+10 |
| | | | | | This prevents IntegrityError caused by race conditions between missing ids retrieval and bulk insertions. | ||||
* | Followed style guide for model attribute ordering. | Matt Wiens | 2018-12-27 | 1 | -6/+6 |
| | |||||
* | Fixed #29725 -- Removed unnecessary join in QuerySet.count() and exists() on ↵ | oliver | 2018-10-15 | 2 | -3/+53 |
| | | | | a many-to-many relation. | ||||
* | Fixed typo in tests/many_to_many/tests.py. | Rajesh Veeranki | 2017-10-31 | 1 | -2/+2 |
| | |||||
* | Used assertRaisesMessage() to test Django's error messages. | Mads Jensen | 2017-07-29 | 1 | -1/+5 |
| | |||||
* | Refs #23919, #27778 -- Removed obsolete mentions of unicode. | Vytis Banaitis | 2017-01-26 | 1 | -1/+1 |
| | |||||
* | Refs #23919 -- Removed python_2_unicode_compatible decorator usage | Claude Paroz | 2017-01-18 | 1 | -4/+0 |
| | |||||
* | Refs #23919 -- Removed encoding preambles and future imports | Claude Paroz | 2017-01-18 | 2 | -4/+0 |
| | |||||
* | Refs #25550 -- Removed support for direct assignment to the reverse side of ↵ | Tim Graham | 2017-01-17 | 1 | -31/+7 |
| | | | | a related set. | ||||
* | Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. | za | 2016-11-10 | 1 | -6/+6 |
| | |||||
* | Refs #25415 -- Fixed invalid models in the test suite. | Adam Chainz | 2016-09-09 | 1 | -1/+0 |
| | |||||
* | Fixed #26706 -- Made RelatedManager modification methods clear ↵ | Yoong Kang Lim | 2016-08-05 | 1 | -0/+34 |
| | | | | prefetch_related() cache. | ||||
* | Refs #25550 -- Corrected deprecation message for assigning M2M relations. | Tim Graham | 2016-07-30 | 1 | -2/+11 |
| | |||||
* | Fixed #26176 -- Fixed E123 flake8 warnings.26176 | Tim Graham | 2016-02-05 | 1 | -121/+144 |
| | |||||
* | Refs #26022 -- Used context manager version of assertRaises in tests. | Hasan | 2016-01-29 | 1 | -1/+2 |
| | |||||
* | Fixed #14286 -- Added models.BigAutoField. | Alexander Sosnovskiy | 2015-12-25 | 1 | -0/+10 |
| | |||||
* | Fixed #25550 -- Deprecated direct assignment to the reverse side of a ↵ | Tim Graham | 2015-10-27 | 1 | -11/+41 |
| | | | | related set. | ||||
* | Renamed descriptor classes for related objects. | Aymeric Augustin | 2015-09-21 | 1 | -2/+2 |
| | | | | | | | | | | | | The old names were downright confusing. Some seemed to mean the opposite of what the class actually did. The new names follow a consistent nomenclature: (Forward|Reverse)(ManyToOne|OneToOne|ManyToMany)Descriptor. I mentioned combinations that do not exist in the docstring in order to help people who would search for them in the code base. | ||||
* | Fixed #24156 -- Fixed inherited related name of ManyToManyField. | Andriy Sokolovskiy | 2015-05-12 | 2 | -1/+43 |
| | | | | | Fixed situation when parent abstract model declares related_name='+', and child models had an invalid queryset. | ||||
* | Merged ManyRelatedObjectsDescriptor and ReverseManyRelatedObjectsDescriptor | Loic Bistuer | 2015-02-16 | 1 | -1/+1 |
| | | | | | and made all "many" related objects descriptors inherit from ForeignRelatedObjectsDescriptor. | ||||
* | Fixed #6707 -- Added RelatedManager.set() and made descriptors' __set__ use it. | Loic Bistuer | 2015-02-05 | 1 | -0/+39 |
| | | | | Thanks Anssi Kääriäinen, Carl Meyer, Collin Anderson, and Tim Graham for the reviews. | ||||
* | Removed numbering from the models.py header of some test packages. | Loic Bistuer | 2014-09-24 | 1 | -1/+1 |
| | | | | This is a reliqua from the early days of the modeltests/regressiontests era. | ||||
* | Fixed mistake in tests from commit 2039908. Refs #19816. | Loic Bistuer | 2014-03-30 | 1 | -2/+2 |
| | |||||
* | Fixed #19816 -- Pre-evaluate querysets used in direct relation assignments. | Loic Bistuer | 2014-03-30 | 1 | -0/+24 |
| | | | | | | | | | | Since assignments on M2M or reverse FK descriptors is composed of a `clear()`, followed by an `add()`, `clear()` could potentially affect the value of the assigned queryset before the `add()` step; pre-evaluating it solves the problem. This patch fixes the issue for ForeignRelatedObjectsDescriptor, ManyRelatedObjectsDescriptor, and ReverseGenericRelatedObjectsDescriptor. It completes 6cb6e1 which addressed ReverseManyRelatedObjectsDescriptor. | ||||
* | Fixed transaction handling for a number of operations on related objects. | Loic Bistuer | 2014-03-30 | 1 | -1/+4 |
| | | | | Thanks Anssi and Aymeric for the reviews. Refs #21174. | ||||
* | PEP8 cleanup | Jason Myers | 2013-11-02 | 1 | -0/+1 |
| | | | | Signed-off-by: Jason Myers <jason@jasonamyers.com> | ||||
* | Fix all violators of E231 | Alex Gaynor | 2013-10-26 | 1 | -6/+6 |
| | |||||
* | Removed unused local variables in tests. | Tim Graham | 2013-10-19 | 1 | -2/+2 |
| | |||||
* | Removed most of absolute_import imports | Claude Paroz | 2013-07-29 | 1 | -1/+1 |
| | | | | | Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way. | ||||
* | Fixed #20207 -- Handle ManyToManyField with a unicode name correctly. | Simon Charette | 2013-04-05 | 1 | -1/+4 |
| | |||||
* | Merged regressiontests and modeltests into the test root. | Florian Apolloner | 2013-02-26 | 3 | -0/+423 |