summaryrefslogtreecommitdiff
path: root/tests/generic_relations_regress
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #16055 -- Fixed crash when filtering against char/text GenericRelation ↵David Wobrock2023-04-182-0/+16
| | | | relation on PostgreSQL.
* Fixed #26261 -- Fixed queryset crash when excluding reverse GenericRelation.roman_p2022-11-181-0/+10
| | | | Thanks Amir Hadi for the report.
* Fixed #33004 -- Made saving objects with unsaved GenericForeignKey raise ↵sarahboyce2022-04-212-15/+0
| | | | | | | | ValueError. This aligns to the behaviour of OneToOneField and ForeignKey fields. Thanks Jonny Park for the initial patch.
* Refs #13085 -- Removed unnecessary ManyToManyFields from ↵Mariusz Felisiak2022-04-211-3/+1
| | | | generic_relations_regress test models.
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-072-63/+111
|
* Fixed isolation of GenericRelationTests.test_filter_targets_related_pk().Mariusz Felisiak2021-07-081-3/+5
|
* Fixed GenericRelationTests.test_annotate when primary key values are large.Tim Graham2020-11-041-1/+1
| | | | | On CockroachDB, primary key values stored in this fields are larger than they accept.
* Removed unused __str__() methods in tests models.Mariusz Felisiak2020-04-301-22/+2
| | | Follow up to 6461583b6cc257d25880ef9a9fd7e2125ac53ce1.
* Simplified imports from django.db and django.contrib.gis.db.Nick Pope2020-02-042-5/+3
|
* Fixed #29653 -- Fixed missing related_query_name reverse accessor if ↵Ramiro Morales2018-08-102-1/+10
| | | | | | | | GenericRelation is declared on an abstract base model. Regression in 4ab027b94409e6415b774797bf9d3593da9d9ea8. Thanks Lauri Kainulainen for the report.
* Fixed #29227 -- Allowed BooleanField to be null=True.Tim Graham2018-03-201-1/+1
| | | | Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
* Fixed #28988 -- Fixed queries when a GenericRelation is used with ↵robwa2018-03-122-1/+11
| | | | multi-table inheritance.
* Refs #28856 -- Added test for caching of a GenericForeignKey pointing to a ↵Morgan Wahl2017-12-082-3/+14
| | | | | | | model that uses more than one level of MTI. Forwardport of test and release notes of 35222035029863f95769e2e59beeeb953d125689 from stable/1.11.x
* Fixed #28856 -- Fixed a regression in caching of a GenericForeignKey ↵Simon Charette2017-11-301-0/+6
| | | | | | pointing to a MTI model. Regression in b9f8635f58ad743995cad2081b3dc395e55761e5.
* Fixed #28418 -- Fixed queryset crash when using a GenericRelation to a proxy ↵Rachel Tobin2017-07-212-0/+11
| | | | model.
* Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand2017-01-251-1/+1
|
* Refs #23919 -- Removed __nonzero__() methods (for Python 2).Simon Charette2017-01-192-7/+8
| | | | Thanks Tim for the review.
* Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz2017-01-181-8/+0
|
* Fixed #27463 -- Fixed E741 flake8 warnings.Ramin Farajpour Cami2016-11-141-6/+6
|
* Fixed E305 flake8 warnings.Ramin Farajpour Cami2016-11-141-0/+1
|
* Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za2016-11-101-9/+5
|
* Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with ↵Mads Jensen2016-09-131-39/+11
| | | | assertSequenceEqual().
* Replaced use of TestCase.fail() with assertRaises().Tim Graham2016-06-281-9/+5
| | | Also removed try/except/fail antipattern that hides exceptions.
* Sorted single letter imports per the latest version of isort.Tim Graham2016-03-281-1/+1
|
* Refs #26022 -- Used context manager version of assertRaises in tests.Hasan2016-01-291-1/+2
|
* Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella2015-07-271-11/+11
| | | | ForeignKey/OneToOneField
* Refs #24267 -- Implemented lookups for related fieldsAnssi Kääriäinen2015-03-251-6/+10
| | | | | | | | | | Previously related fields didn't implement get_lookup, instead related fields were treated specially. This commit removed some of the special handling. In particular, related fields return Lookup instances now, too. Other notable changes in this commit is removal of support for annotations in names_to_path().
* Sorted imports with isort; refs #23860.Tim Graham2015-02-062-9/+7
|
* Fixed #12663 -- Formalized the Model._meta API for retrieving fields.Daniel Pyrathon2015-01-061-1/+1
| | | | | Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch!
* Fixed #24002 -- GenericRelation filtering targets related model's pkAnssi Kääriäinen2014-12-171-2/+14
| | | | | | | Previously Publisher.objects.filter(book=val) would target book.object_id if book is a GenericRelation. This is inconsistent to filtering over reverse foreign key relations, where the target is the related model's primary key.
* Corrected test assertion from refs #21403.Tim Graham2014-12-151-1/+1
|
* Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag2014-11-031-2/+2
|
* Fixed #22982 -- Added GenericRelatedObjectManager.__str__. to prevent crash.Jacob Haslehurst2014-08-071-0/+4
| | | | | | Thanks bendavis78 for the report. Forwardport of 29585e9b6a from stable/1.7.x
* PEP8 cleanupAnssi Kääriäinen2014-07-161-1/+1
|
* Fixed #22998 -- Updated the fast_delete logic for GFKsGavin Wahl2014-07-162-1/+38
|
* Fixed #22207 -- Added support for GenericRelation reverse lookupsGabe Jackson2014-03-051-1/+1
| | | | | | | | | 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-261-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.
* Fixed #21403: Corrected test codeShai Berger2013-11-251-3/+3
| | | | | | A test for annotations incorrectly assumed that the first instance (in the test) of a model using AutoField for PK will always get pk=1. The test was changed to compare against actual instance id instead.
* Fixed #21428 -- editable GenericRelation regressionAnssi Kääriäinen2013-11-162-1/+22
| | | | | | | | | | | | The GenericRelation refactoring removed GenericRelations from model._meta.many_to_many. This had the side effect of disallowing editable GenericRelations in ModelForms. Editable GenericRelations aren't officially supported, but if we don't fix this we don't offer any upgrade path for those who used the ability to set editable=True in GenericRelation subclass. Thanks to Trac alias joshcartme for the report and stephencmd and Loic for working on this issue.
* Fixed #10461 -- bug in generic relation + annotate() caseAnssi Kääriäinen2013-11-051-1/+24
| | | | | This issue was fixed when the contenttype restriction was moved from where clause to the join clause. So, this is tests only addition.
* PEP8 cleanupJason Myers2013-11-021-0/+25
| | | | Signed-off-by: Jason Myers <jason@jasonamyers.com>
* Fixed #21298 -- Fixed E301 pep8 warningsAlasdair Nicol2013-10-231-0/+1
|
* Fixed #20564 -- Generic relations exclude() regressionAnssi Kääriäinen2013-06-062-1/+81
| | | | | | | | | The patch for #19385 caused a regression in certain generic relations .exclude() filters if a subquery was needed. The fix contains a refactoring to how Query.split_exclude() and Query.trim_start() interact. Thanks to Trac alias nferrari for the report.
* PEP 8 cleanupAnssi Kääriäinen2013-06-051-12/+15
|
* Fixed #20378 -- regression in GenericRelation on abstract modelAnssi Kääriäinen2013-05-202-1/+28
| | | | | | | | | When a GenericRelation was defined on abstract model, queries on childs of the abstract model didn't work. The problem was in the way fields and in particular field.rel was copied from models to their children. The regression was likely caused by #19385. Thanks to Gavin Wahl for spotting the regression.
* Merged regressiontests and modeltests into the test root.Florian Apolloner2013-02-263-0/+261