Loic Bistuer
c5a77721e2
Merged ManyRelatedObjectsDescriptor and ReverseManyRelatedObjectsDescriptor
...
and made all "many" related objects descriptors inherit from
ForeignRelatedObjectsDescriptor.
2015-02-16 20:40:04 +07:00
Loic Bistuer
71ada3a8e6
Fixed #6707 -- Added RelatedManager.set() and made descriptors' __set__ use it.
...
Thanks Anssi Kääriäinen, Carl Meyer, Collin Anderson, and Tim Graham for the reviews.
2015-02-05 12:45:08 +07:00
Loic Bistuer
2f3a4cd573
Removed numbering from the models.py header of some test packages.
...
This is a reliqua from the early days of the modeltests/regressiontests era.
2014-09-24 17:28:56 +07:00
Loic Bistuer
da7ab8728c
Fixed mistake in tests from commit 2039908
. Refs #19816 .
2014-03-30 18:48:27 +07:00
Loic Bistuer
20399083f4
Fixed #19816 -- Pre-evaluate querysets used in direct relation assignments.
...
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.
2014-03-30 15:36:45 +07:00
Loic Bistuer
bc9be72bdc
Fixed transaction handling for a number of operations on related objects.
...
Thanks Anssi and Aymeric for the reviews. Refs #21174 .
2014-03-30 12:13:00 +07:00
Jason Myers
7a61c68c50
PEP8 cleanup
...
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-11-02 23:50:49 -05:00
Alex Gaynor
9d740eb8b1
Fix all violators of E231
2013-10-26 12:15:03 -07:00
Tim Graham
96d1d4e292
Removed unused local variables in tests.
2013-10-19 08:31:38 -04:00
Claude Paroz
5c1143910e
Removed most of absolute_import imports
...
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
2013-07-29 20:28:13 +02:00
Simon Charette
216580e034
Fixed #20207 -- Handle ManyToManyField with a unicode name correctly.
2013-04-05 15:09:53 -04:00
Florian Apolloner
89f40e3624
Merged regressiontests and modeltests into the test root.
2013-02-26 14:36:57 +01:00