Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵ | Gregor Gärtner | 2022-10-08 | 1 | -46/+46 |
| | | | | | | assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com> | ||||
* | Fixed #33984 -- Reverted "Fixed #32980 -- Made models cache related managers." | Mariusz Felisiak | 2022-09-30 | 2 | -92/+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 #33476 -- Reformatted code with Black. | django-bot | 2022-02-07 | 2 | -170/+298 |
| | |||||
* | Fixed #32980 -- Made models cache related managers. | Keryn Knight | 2021-11-08 | 2 | -4/+88 |
| | |||||
* | Removed unused __str__() methods in tests models. | Mariusz Felisiak | 2020-04-30 | 1 | -18/+0 |
| | | | Follow up to 6461583b6cc257d25880ef9a9fd7e2125ac53ce1. | ||||
* | Fixed #28838 -- Fixed Model.save() crash if the base manager annotates with ↵ | shanghui | 2018-01-25 | 2 | -1/+29 |
| | | | | a related field. | ||||
* | Fixed #28918 -- Fixed Model.refresh_from_db() for instances hidden by the ↵ | Tim Graham | 2017-12-30 | 1 | -0/+10 |
| | | | | default manager. | ||||
* | Used assertRaisesMessage() to test Django's error messages. | Mads Jensen | 2017-07-29 | 1 | -3/+6 |
| | |||||
* | Refs #27804 -- Used subTest() in several tests. | Bruno Alla | 2017-05-24 | 1 | -25/+28 |
| | |||||
* | Refs #23919 -- Replaced super(ClassName, self) with super(). | chillaranand | 2017-01-25 | 1 | -10/+10 |
| | |||||
* | Refs #23919 -- Removed six.<various>_types usage | Claude Paroz | 2017-01-18 | 1 | -5/+4 |
| | | | | Thanks Tim Graham and Simon Charette for the reviews. | ||||
* | Refs #23919 -- Removed python_2_unicode_compatible decorator usage | Claude Paroz | 2017-01-18 | 1 | -8/+0 |
| | |||||
* | Refs #23919 -- Removed encoding preambles and future imports | Claude Paroz | 2017-01-18 | 2 | -4/+0 |
| | |||||
* | Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. | za | 2016-11-10 | 1 | -10/+10 |
| | |||||
* | Fixed #26747 -- Used more specific assertions in the Django test suite. | Jon Dufresne | 2016-06-16 | 1 | -3/+3 |
| | |||||
* | Fixed #10506, #13793, #14891, #25201 -- Introduced new APIs to specify ↵ | Loïc Bistuer | 2016-05-17 | 2 | -2/+43 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | models' default and base managers. This deprecates use_for_related_fields. Old API: class CustomManager(models.Model): use_for_related_fields = True class Model(models.Model): custom_manager = CustomManager() New API: class Model(models.Model): custom_manager = CustomManager() class Meta: base_manager_name = 'custom_manager' Refs #20932, #25897. Thanks Carl Meyer for the guidance throughout this work. Thanks Tim Graham for writing the docs. | ||||
* | Fixed E128 flake8 warnings in tests/. | Tim Graham | 2016-04-08 | 1 | -7/+10 |
| | |||||
* | Refs #26022 -- Used context manager version of assertRaises in tests. | Hasan | 2016-01-29 | 1 | -1/+2 |
| | |||||
* | Refs #20625 -- Forwardported tests and release notes for queryset chaining fix. | Aric Coady | 2015-09-17 | 1 | -0/+4 |
| | | | | | | The issue was fixed on master due to the removal of ValuesQuerySet. Partial forwardport of 7d471fe6626de2b36b97ac04086d8ea307be8288 from stable/1.8.x | ||||
* | Fixed #21127 -- Started deprecation toward requiring on_delete for ↵ | Flavio Curella | 2015-07-27 | 1 | -6/+11 |
| | | | | ForeignKey/OneToOneField | ||||
* | Fixed #24911 -- Made BaseManager.get_queryset() allow custom queryset args. | Jonas Degrave | 2015-06-30 | 2 | -0/+16 |
| | |||||
* | Refs #20203 -- Added tests to check inherited custom default manager | Andriy Sokolovskiy | 2015-06-29 | 2 | -2/+25 |
| | |||||
* | Sorted imports with isort; refs #23860. | Tim Graham | 2015-02-06 | 2 | -4/+8 |
| | |||||
* | Fixed #23822 -- Added support for serializing model managers in migration | Markus Holtermann | 2014-12-15 | 2 | -1/+48 |
| | | | | | Thanks to Shai Berger, Loïc Bistuer, Simon Charette, Andrew Godwin, Tim Graham, Carl Meyer, and others for their review and input. | ||||
* | Readded test inadvertently removed in last commit. | Tim Graham | 2014-12-11 | 1 | -0/+7 |
| | |||||
* | Refs #18586 -- Split custom manager tests. | Shabda Raaj | 2014-12-11 | 1 | -60/+89 |
| | |||||
* | 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. | ||||
* | Merged custom_managers_regress into the custom_managers test package. | Loic Bistuer | 2014-09-23 | 2 | -12/+86 |
| | |||||
* | Fixed #19774 -- Deprecated the contenttypes.generic module. | Simon Charette | 2014-01-26 | 1 | -5/+7 |
| | | | | | | | It contained models, forms and admin objects causing undesirable import side effects. Refs #16368. Thanks to Ramiro, Carl and Loïc for the review. | ||||
* | PEP-8 cleanup | Anssi Kääriäinen | 2013-11-27 | 2 | -1/+1 |
| | | | | Refs #21169 | ||||
* | Added a bulk option to RelatedManager remove() and clear() methods | Loic Bistuer | 2013-11-27 | 1 | -16/+28 |
| | | | | Refs #21169 | ||||
* | Fixed #21169 -- Reworked RelatedManager methods use default filtering | Loic Bistuer | 2013-11-27 | 2 | -27/+311 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | The `remove()` and `clear()` methods of the related managers created by `ForeignKey`, `GenericForeignKey`, and `ManyToManyField` suffered from a number of issues. Some operations ran multiple data modifying queries without wrapping them in a transaction, and some operations didn't respect default filtering when it was present (i.e. when the default manager on the related model implemented a custom `get_queryset()`). Fixing the issues introduced some backward incompatible changes: - The implementation of `remove()` for `ForeignKey` related managers changed from a series of `Model.save()` calls to a single `QuerySet.update()` call. The change means that `pre_save` and `post_save` signals aren't called anymore. - The `remove()` and `clear()` methods for `GenericForeignKey` related managers now perform bulk delete so `Model.delete()` isn't called anymore. - The `remove()` and `clear()` methods for `ManyToManyField` related managers perform nested queries when filtering is involved, which may or may not be an issue depending on the database and the data itself. Refs. #3871, #21174. Thanks Anssi Kääriäinen and Tim Graham for the reviews. | ||||
* | PEP8 cleanup | Jason Myers | 2013-11-02 | 1 | -0/+10 |
| | | | | Signed-off-by: Jason Myers <jason@jasonamyers.com> | ||||
* | Fixed #21268 -- Fixed E303 pep8 warnings | Alasdair Nicol | 2013-10-18 | 1 | -1/+0 |
| | |||||
* | Fixed #3871 -- Custom managers when traversing reverse relations. | Loic Bistuer | 2013-09-25 | 2 | -11/+106 |
| | |||||
* | Removed some more unused local vars | Alex Gaynor | 2013-09-08 | 1 | -4/+4 |
| | |||||
* | Fixed "indentation is not a multiple of four" pep8 issues. | Tim Graham | 2013-09-03 | 1 | -2/+2 |
| | |||||
* | Fixed #20895 -- Made check management command warn if a BooleanField does ↵ | Alasdair Nicol | 2013-08-15 | 1 | -2/+2 |
| | | | | | | | not have a default value Thanks to Collin Anderson for the suggestion and Tim Graham for reviewing the patch. | ||||
* | 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 a number of minor misspellings. | Julien Phalip | 2013-07-27 | 1 | -1/+1 |
| | |||||
* | Fixed #20625 -- Chainable Manager/QuerySet methods. | Loic Bistuer | 2013-07-26 | 2 | -6/+88 |
| | | | | | | | | | | | Additionally this patch solves the orthogonal problem that specialized `QuerySet` like `ValuesQuerySet` didn't inherit from the current `QuerySet` type. This wasn't an issue until now because we didn't officially support custom `QuerySet` but it became necessary with the introduction of this new feature. Thanks aaugustin, akaariai, carljm, charettes, mjtamlyn, shaib and timgraham for the reviews. | ||||
* | Use assertIsInstance in tests. | Marc Tamlyn | 2013-05-21 | 1 | -2/+2 |
| | | | | Gives much nicer errors when it fails. | ||||
* | Fixed #15363 -- Renamed and normalized to `get_queryset` the methods that ↵ | Loic Bistuer | 2013-03-08 | 1 | -5/+5 |
| | | | | return a QuerySet. | ||||
* | Merged regressiontests and modeltests into the test root. | Florian Apolloner | 2013-02-26 | 3 | -0/+139 |