summaryrefslogtreecommitdiff
path: root/tests/ordering
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #34372 -- Fixed queryset crash on order by aggregation using OrderBy.Simon Charette2023-02-271-0/+6
| | | | | | Regression in 278881e37619278789942513916acafaa88d26f3 caused by a lack of expression copying when an OrderBy expression is explicitly provided. Thanks Jannis Vajen for the report and regression test.
* Fixed #34346 -- Ordered selected expressions by position.Simon Charette2023-02-201-0/+19
| | | | | | | | | Used the same approach as for #34176 by using selected expressions position to prevent ambiguous aliases in collisions. Thanks henribru for the report. Regression in 04518e310d4552ff7595a34f5a7f93487d78a406.
* Refs #33308 -- Added tests for queryset ordered by annotation with ↵Simon Charette2023-02-181-0/+12
| | | | nulls_first/nulls_last.
* Fixed #34105 -- Fixed crash of ordering by nested selected expression.Simon Charette2022-10-181-1/+9
| | | | | | | | This stops ordering by nested selected references. It's not supported on PostgreSQL and not required to support psycopg3. Regression in 04518e310d4552ff7595a34f5a7f93487d78a406. Thanks Matt Westcott for the report.
* Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵Gregor Gärtner2022-10-081-35/+35
| | | | | | assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com>
* Fixed #34012 -- Made QuerySet.order_by() apply transforms on related fields ↵David Sanders2022-10-041-0/+13
| | | | | | | | | | | for models with Meta.ordering. This makes QuerySet.order_by() no longer ignore trailing transforms for models with Meta.ordering. As a consequence, FieldError is raised in such cases for non-existent fields. Thanks to Klaas van Schelven for the report and Mariusz Felisiak for the review and advice.
* Fixed #29538 -- Fixed crash of ordering by related fields when Meta.ordering ↵Ed Rivas2022-05-122-1/+55
| | | | | | contains expressions. Thanks Simon Charette for the review.
* Removed redundant QuerySet.all() calls in docs and tests.Nick Pope2022-02-221-1/+1
| | | | Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager.
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-072-134/+193
|
* Fixed #32546 -- Avoided Meta.ordering columns in GROUP BY clauses.Yuri Konotopov2021-03-161-1/+10
| | | | Follow up to 0ddb4ebf7bfcc4730c80a772dd146a49ef6895f6.
* Removed serial pk assumption in ordering tests.Tim Graham2020-11-031-5/+5
| | | | | Fixed OrderingTests.test_order_by_fk_attname and test_order_by_pk on CockroachDB.
* Fixed #30446 -- Resolved Value.output_field for stdlib types.Simon Charette2020-07-151-12/+0
| | | | | | This required implementing a limited form of dynamic dispatch to combine expressions with numerical output. Refs #26355 should eventually provide a better interface for that.
* Fixed #31657 -- Fixed ordering by attnames of self-referential ForeignKeys.Hasan Ramezani2020-06-101-0/+5
|
* Refs #31657 -- Added test for ordering by self-referential ForeignKeys.Hasan Ramezani2020-06-102-0/+12
|
* Removed unused __str__() methods in tests models.Mariusz Felisiak2020-04-301-3/+0
| | | Follow up to 6461583b6cc257d25880ef9a9fd7e2125ac53ce1.
* Simplified imports from django.db and django.contrib.gis.db.Nick Pope2020-02-041-2/+1
|
* Refs #14357 -- Made Meta.ordering not affect GROUP BY queries.Mariusz Felisiak2019-09-101-12/+1
| | | | Per deprecation timeline.
* Refs #30557 -- Fixed crash of ordering by ptr fields when Meta.ordering ↵Mariusz Felisiak2019-07-112-2/+2
| | | | | | | contains F() expressions. Thanks Can Sarıgöl for the report. Follow up to 8c5f9906c56ac72fc4f13218dd90bdf9bc8a248b.
* Fixed #30557 -- Fixed crash of ordering by ptr fields when Meta.ordering ↵Hasan Ramezani2019-07-112-1/+25
| | | | contains expressions.
* Fixed #26192 -- Fixed crash of ordering by constants on PostgreSQL.Mariusz Felisiak2019-05-311-3/+21
| | | | Thanks Simon Charette for the review.
* Refs #26192 -- Added tests for ordering by constant value.Mariusz Felisiak2019-05-311-1/+16
|
* Fixed #30501 -- Preventing QuerySet.reverse() from mutating expressions in ↵Mariusz Felisiak2019-05-231-7/+31
| | | | QuerySet.order_by and Meta.ordering.
* Fixed #30463 -- Fixed crash of deprecation message when Meta.ordering ↵ruchit28012019-05-182-2/+10
| | | | | | contains expressions. Regression in 1b1f64ee5a78cc217fead52cbae23114502cf564.
* Refs #14357 -- Deprecated Meta.ordering affecting GROUP BY queries.Ramiro Morales2018-09-131-1/+10
| | | Thanks Ramiro Morales for contributing to the patch.
* Fixed #28848 -- Fixed SQLite/MySQL crash when ordering by a filtered ↵Raphael Michel2017-11-271-1/+22
| | | | subquery that uses nulls_first/nulls_last.
* Fixed #28722 -- Made QuerySet.reverse() affect nulls_first/nulls_last.Tomer Chachamu2017-10-211-16/+20
|
* Fixed #28335 -- Allowed query expressions in Meta.ordering.Dima Kudosh2017-09-052-1/+17
|
* Fixed #22550 -- Prohibited QuerySet.last()/reverse() after slicing.Matthias Erll2017-05-311-0/+8
|
* Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz2017-01-181-2/+0
|
* Refs #23919 -- Removed encoding preambles and future importsClaude Paroz2017-01-181-2/+0
|
* Fixed #13312 -- Allowed specifying the order of null fields in queries.Yohann Gabory2016-12-082-2/+52
| | | | Thanks Mariusz Felisiak for finishing the patch.
* Used setUpTestData() in ordering tests.Mariusz Felisiak2016-11-151-23/+15
|
* Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za2016-11-101-5/+3
|
* Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with ↵Mads Jensen2016-09-131-1/+1
| | | | assertSequenceEqual().
* Refs #25415 -- Fixed invalid models in the test suite.Adam Chainz2016-09-091-1/+1
|
* Correct a grammatical error: "it's related model"Noenglish Professorbut2016-03-091-1/+1
| | | | | I am no English professor, but "inheriting its related model" should not contain an apostrophe. For reference, see http://theoatmeal.com/comics/apostrophe
* Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella2015-07-271-3/+3
| | | | ForeignKey/OneToOneField
* Fixed #24654 -- Based ordering circular references detection on columns.Simon Charette2015-04-202-1/+32
| | | | Thanks to Elmar Bucher for the report and Tim for the review.
* Refs #24060 -- Added a test demonstrating reverse order isn't mutableJosh Smeaton2015-01-281-0/+22
|
* Fixed #24174 -- Fixed extra order by descendingJosh Smeaton2015-01-191-0/+20
|
* Fixed #24060 -- Added OrderBy ExpressionsJosh Smeaton2015-01-131-0/+62
|
* Removed numbering from the models.py header of some test packages.Loic Bistuer2014-09-241-1/+1
| | | | This is a reliqua from the early days of the modeltests/regressiontests era.
* Fixed #19195 -- Allow explicit ordering by a relation `_id` field.Simon Charette2014-04-302-48/+80
| | | | | Thanks to chrisedgemon for the report and shaib, akaariai and timgraham for the review.
* Fixing E302 ErrorsJason Myers2013-11-021-0/+1
| | | | Signed-off-by: Jason Myers <jason@jasonamyers.com>
* Fixed #21298 -- Fixed E301 pep8 warningsAlasdair Nicol2013-10-231-0/+2
|
* Removed unused local variables in tests.Tim Graham2013-10-191-7/+7
|
* 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.
* Merged regressiontests and modeltests into the test root.Florian Apolloner2013-02-263-0/+205