Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests/generic_relations
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #25550 -- Deprecated direct assignment to the ↵Tim Graham2015-10-271-6/+6
| | | | reverse side of a related set.
* Refs #19722 -- Added a test for querying generic ↵Tim Graham2015-10-082-2/+15
| | | | | | relations of a parent class. Fixed in c9a96075fa02b6d52bec748ffdfb413688a15774.
* Refs #13203, #9501 -- Added a test for generic relations ↵Tim Graham2015-10-022-1/+13
| | | | | | to child models. Fixed in 97774429aeb54df4c09895c07cd1b09e70201f7d.
* Renamed descriptor classes for related objects.Aymeric Augustin2015-09-211-1/+1
| | | | | | | | | | | | 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 #23395 -- Limited line lengths to 119 characters.Dražen Odobašić2015-09-121-9/+48
|
* Fixed #25160 -- Moved unsaved model instance data loss ↵Tim Graham2015-08-101-0/+10
| | | | | | | | | check to Model.save() This mostly reverts 5643a3b51be338196d0b292d5626ad43648448d3 and 81e1a35c364e5353d2bf99368ad30a4184fbb653. Thanks Carl Meyer for review.
* Fixed #18556 -- Allowed RelatedManager.add() to execute ↵Tim Graham2015-07-281-2/+28
| | | | | | 1 query where possible. Thanks Loic Bistuer for review.
* Fixed #21127 -- Started deprecation toward requiring ↵Flavio Curella2015-07-281-6/+6
| | | | on_delete for ForeignKey/OneToOneField
* Refs #24652 -- Used SimpleTestCase where appropriate.Simon Charette2015-05-201-2/+2
|
* Sorted imports with isort; refs #23860.Tim Graham2015-02-062-5/+6
|
* Fixed #6707 -- Added RelatedManager.set() and made ↵Loic Bistuer2015-02-051-0/+52
| | | | | | descriptors' __set__ use it. Thanks Anssi Kääriäinen, Carl Meyer, Collin Anderson, and Tim Graham for the reviews.
* Fixed #24099 -- Removed contenttype.name deprecated fieldClaude Paroz2015-01-161-1/+1
| | | | | | This finsishes the work started on #16803. Thanks Simon Charette, Tim Graham and Collin Anderson for the reviews.
* Fixed #12663 -- Formalized the Model._meta API for ↵Daniel Pyrathon2015-01-071-1/+2
| | | | | | | retrieving fields. Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch!
* Fixed flake8 warning.Tim Graham2014-10-091-1/+0
|
* Fixed #23611 -- update_or_create failing from a related ↵Loic Bistuer2014-10-071-0/+48
| | | | | | | | manager Added update_or_create to RelatedManager, ManyRelatedManager and GenericRelatedObjectManager. Added missing get_or_create to GenericRelatedObjectManager.
* 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.
* Fixed #22992 -- regression in .filter(generic_fk=...) ↵Anssi Kääriäinen2014-07-141-0/+4
| | | | | | | | | | | | | | | | error message Generic Foreign Keys can't be used as lhs in lookups for historical reasons. Django 1.6 gave a FieldDoesNotExist exception when using GFKs as lhs in lookups, but due to regression caused by lookup refactor patch (20bab2cf9d02a5c6477d8aac066a635986e0d3f3) the exception type was changed to AttributeError. It might be a good idea to add support for gfk__exact and gfk__in lookups later on. Thanks to glicerinu@gmail.com for the report. The code in this commit was written by Tim Graham.
* Split GenericRelationsTests.test_generic_relations into ↵José L. Patiño2014-06-011-98/+134
| | | | several tests; refs #18586.
* Fixed #19816 -- Pre-evaluate querysets used in direct ↵Loic Bistuer2014-03-301-0/+15
| | | | | | | | | | | | 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.
* Fixed #22207 -- Added support for GenericRelation ↵Gabe Jackson2014-03-052-2/+20
| | | | | | | | | | | reverse lookups GenericRelation now supports an optional related_query_name argument. Setting related_query_name adds a relation from the related object back to the content type for filtering, ordering and other query operations. Thanks to Loic Bistuer for spotting a couple of important issues in his review.
* Fixed #19774 -- Deprecated the contenttypes.generic module.Simon Charette2014-01-262-16/+18
| | | | | | | It contained models, forms and admin objects causing undesirable import side effects. Refs #16368. Thanks to Ramiro, Carl and Loïc for the review.
* PEP8 cleanupJason Myers2013-11-031-0/+2
| | | | Signed-off-by: Jason Myers <jason@jasonamyers.com>
* Fixed #21288 -- Fixed E126 pep8 warningsAlasdair Nicol2013-10-211-21/+21
|
* Removed unused local variables in tests.Tim Graham2013-10-191-2/+2
|
* Fixed #21287 -- Fixed E123 pep8 warningsAlasdair Nicol2013-10-181-4/+4
|
* Fixed #21268 -- Fixed E303 pep8 warningsAlasdair Nicol2013-10-181-1/+0
|
* Fixed #7551 -- Made GFK allow None init argument.Bouke Haarsma2013-10-162-1/+23
| | | | Thanks SamBull for the report.
* Fixed #21217 -- Avoid connecting `(pre|post)_init` ↵Simon Charette2013-10-041-7/+23
| | | | signals to abstract senders.
* Fixed #16869 -- BaseGenericInlineFormSet.save_new should ↵Pablo Mouzo2013-09-081-0/+26
| | | | | | use form's save() method Thanks mattaustin for the report and Pablo Recio (pyriku) for the patch.
* Fixed a regression with get_or_create and virtual fields.Tim Graham2013-08-211-0/+23
| | | | | | refs #20429 Thanks Simon Charette for the report and review.
* Fixed #20895 -- Made check management command warn if a ↵Alasdair Nicol2013-08-161-1/+1
| | | | | | | BooleanField does not have a default value Thanks to Collin Anderson for the suggestion and Tim Graham for reviewing the patch.
* Removed most of absolute_import importsClaude Paroz2013-07-291-1/+1
| | | | | Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
* Fixed #17927 -- Added initial values support for ↵Bojan Mihelac2013-06-051-0/+16
| | | | | | BaseGenericInlineFormSet Thanks Fak3 for the suggestion.
* Fixed #17648 -- Add `for_concrete_model` to ↵Gavin Wahl2013-05-242-6/+135
| | | | | | | | | | | `GenericForeignKey`. Allows a `GenericForeignKey` to reference proxy models. The default for `for_concrete_model` is `True` to keep backwards compatibility. Also added the analog `for_concrete_model` kwarg to `generic_inlineformset_factory` to provide an API at the form level.
* Use assertIsInstance in tests.Marc Tamlyn2013-05-211-1/+1
| | | | Gives much nicer errors when it fails.
* Fixed #19939 -- generic relations + split_exclude regressionAnssi Kääriäinen2013-05-112-1/+10
| | | | | Added a test, the issue was already fixed (likely by the patch for #19385).
* Fixed #19733 - deprecated ModelForms without 'fields' or ↵Luke Plant2013-05-091-0/+1
| | | | | | | | 'exclude', and added '__all__' shortcut This also updates all dependent functionality, including modelform_factory and modelformset_factory, and the generic views `ModelFormMixin`, `CreateView` and `UpdateView` which gain a new `fields` attribute.
* Fixed #15363 -- Renamed and normalized to `get_queryset` ↵Loic Bistuer2013-03-081-2/+2
| | | | the methods that return a QuerySet.
* Merged regressiontests and modeltests into the test root.Florian Apolloner2013-02-263-0/+361