Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests/custom_managers/models.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #21127 -- Started deprecation toward requiring ↵Flavio Curella2015-07-281-6/+11
| | | | on_delete for ForeignKey/OneToOneField
* Fixed #24911 -- Made BaseManager.get_queryset() allow ↵Jonas Degrave2015-06-301-0/+7
| | | | custom queryset args.
* Refs #20203 -- Added tests to check inherited custom ↵Andriy Sokolovskiy2015-06-301-0/+12
| | | | default manager
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-1/+3
|
* Fixed #23822 -- Added support for serializing model ↵Markus Holtermann2014-12-151-0/+7
| | | | | | | managers in migration Thanks to Shai Berger, Loïc Bistuer, Simon Charette, Andrew Godwin, Tim Graham, Carl Meyer, and others for their review and input.
* Removed numbering from the models.py header of some test ↵Loic Bistuer2014-09-241-1/+1
| | | | | | packages. This is a reliqua from the early days of the modeltests/regressiontests era.
* Merged custom_managers_regress into the custom_managers ↵Loic Bistuer2014-09-221-11/+40
| | | | test package.
* Fixed #19774 -- Deprecated the contenttypes.generic module.Simon Charette2014-01-261-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 cleanupAnssi Kääriäinen2013-11-271-0/+1
| | | | Refs #21169
* Fixed #21169 -- Reworked RelatedManager methods use ↵Loic Bistuer2013-11-271-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | default filtering 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 cleanupJason Myers2013-11-031-0/+10
| | | | Signed-off-by: Jason Myers <jason@jasonamyers.com>
* Fixed #3871 -- Custom managers when traversing reverse ↵Loic Bistuer2013-09-251-0/+20
| | | | relations.
* Fixed #20895 -- Made check management command warn if a ↵Alasdair Nicol2013-08-161-2/+2
| | | | | | | BooleanField does not have a default value Thanks to Collin Anderson for the suggestion and Tim Graham for reviewing the patch.
* Fixed #20625 -- Chainable Manager/QuerySet methods.Loic Bistuer2013-07-261-6/+46
| | | | | | | | | | | 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.
* Fixed #15363 -- Renamed and normalized to `get_queryset` ↵Loic Bistuer2013-03-081-5/+5
| | | | the methods that return a QuerySet.
* Merged regressiontests and modeltests into the test root.Florian Apolloner2013-02-261-0/+65