Nick Pope
847f46e9bf
Removed redundant QuerySet.all() calls in docs and tests.
...
Most QuerySet methods are mapped onto the Manager and, in general,
it isn't necessary to call .all() on the manager.
2022-02-22 10:29:38 +01:00
django-bot
9c19aff7c7
Refs #33476 -- Reformatted code with Black.
2022-02-07 20:37:05 +01:00
Matthijs Kooijman
1a5023883b
Fixed #33257 -- Fixed Case() and ExpressionWrapper() with decimal values on SQLite.
2021-11-08 18:02:56 +01:00
Mariusz Felisiak
d992f4e3c2
Refs #31369 -- Removed models.NullBooleanField per deprecation timeline.
2021-01-14 17:50:04 +01:00
Tim Graham
755dbf39fc
Replaced @no_oracle skips with DatabaseFeatures.allows_group_by_lob.
2020-10-22 18:16:58 +02:00
Hannes Ljungberg
0e7a45fca0
Fixed #32126 -- Fixed grouping by Case() annotation without cases.
...
Co-authored-by: Simon Charette <charettes@users.noreply.github.com>
2020-10-21 07:22:52 +02:00
Simon Charette
156a2138db
Refs #30446 -- Removed unnecessary Value(..., output_field) in docs and tests.
2020-07-15 10:58:38 +02:00
Simon Charette
9c5c9bd709
Stopped adapting DecimalField values to strings on PostgreSQL.
...
The psycopg2 backend uses the type information to provide type hints.
2020-07-14 07:40:10 +02:00
Ryan Heard
587b179d41
Fixed #31606 -- Allowed using condition with lookups in When() expression.
2020-05-27 07:32:23 +02:00
Mariusz Felisiak
555e3a848e
Removed unused __str__() methods in tests models.
...
Follow up to 6461583b6c
.
2020-04-30 09:13:23 +02:00
Nick Pope
335c9c94ac
Simplified imports from django.db and django.contrib.gis.db.
2020-02-04 13:20:06 +01:00
Caio Ariede
555bebe774
Fixed #30987 -- Added models.PositiveBigIntegerField.
2019-11-19 09:34:11 +01:00
Matthew Schinckel
4137fc2efc
Fixed #25367 -- Allowed boolean expressions in QuerySet.filter() and exclude().
...
This allows using expressions that have an output_field that is a
BooleanField to be used directly in a queryset filters, or in the
When() clauses of a Case() expression.
Thanks Josh Smeaton, Tim Graham, Simon Charette, Mariusz Felisiak, and
Adam Johnson for reviews.
Co-Authored-By: NyanKiyoshi <hello@vanille.bid>
2019-08-29 09:45:29 +02:00
Mariusz Felisiak
c7f656435c
Added tests for raising an error when passing non-boolean expression to When().
2019-08-29 09:29:46 +02:00
Tim Graham
5fa4f40f45
Fixed #29227 -- Allowed BooleanField to be null=True.
...
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
2018-03-20 12:10:10 -04:00
Mariusz Felisiak
54f80430be
Fixed #29166 -- Fixed crash in When() expression with a list argument.
...
Thanks Matthew Pava for the report and Tim Graham and Carlton Gibson for
reviews.
Regression in 19b2dfd1bf
.
2018-02-28 18:05:23 +01:00
Tim Martin
5778b5701d
Fixed #28731 -- Added an error message when using an empty Q() in a When expression.
...
Otherwise it generates invalid SQL.
2017-12-26 10:39:47 -05:00
Mads Jensen
5114669f72
Refs #24031 -- Added test for Case and When constructor arguments.
2017-10-20 10:15:11 -04:00
Tim Graham
27193aea00
Fixed #28584 -- Dropped support for SQLite < 3.7.15.
2017-10-03 10:42:18 -04:00
Tom
b78d100fa6
Fixed #27849 -- Added filtering support to aggregates.
2017-08-12 17:58:28 -04:00
Tim Graham
d170c63351
Refs #23919 -- Removed misc references to Python 2.
2017-01-21 20:02:00 -05:00
Claude Paroz
7b2f2e74ad
Refs #23919 -- Removed six.<various>_types usage
...
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Claude Paroz
f3c43ad1fd
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
2017-01-18 13:44:34 +01:00
Claude Paroz
d7b9aaa366
Refs #23919 -- Removed encoding preambles and future imports
2017-01-18 09:55:19 +01:00
Tim Graham
bcf3532ede
Refs #26154 -- Removed deprecated CommaSeparatedIntegerField.
2017-01-17 20:52:02 -05:00
Jonatas CD
b28c6ca763
Fixed #27482 -- Doc'd an example of Case() in QuerySet.filter().
2016-11-17 12:39:35 -05:00
Johannes Dollinger
1410616e0e
Fixed #26433 -- Fixed Case expressions with empty When.
2016-08-08 10:43:33 -04:00
Tim Graham
1c8c0837c6
Sorted single letter imports per the latest version of isort.
2016-03-28 11:45:31 -04:00
Alberto Avila
cca151d196
Refs #26071 -- Added test for __in lookup in a Case expression.
...
Forwardport of 5b3c66d8b6
from stable/1.8.x
2016-01-13 08:56:36 -05:00
varunnaganathan
3eba9638ee
Fixed #25316 -- Fixed a crash with order_by() and values() after annotate().
2016-01-02 07:06:54 -05:00
Josh Soref
93452a70e8
Fixed many spelling mistakes in code, comments, and docs.
2015-12-03 12:48:24 -05:00
Dražen Odobašić
b1e33ceced
Fixed #23395 -- Limited line lengths to 119 characters.
2015-09-12 11:40:50 -04:00
Flavio Curella
c2e70f0265
Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField
2015-07-27 18:28:13 -04:00
Mark Lavin
541f4ea546
Fixed #24924 -- Join promotion for multiple Case expressions
2015-06-05 12:22:43 -04:00
Andriy Sokolovskiy
286d0e6ab1
Refs #24833 -- Forwardported some of "Fixed Case expressions with exclude()."
...
Partial forwardport of 469f1e362b
from stable/1.8.x
as the issue was already fixed in master.
2015-06-05 11:21:31 -04:00
Anssi Kääriäinen
bc87061a3c
Fixed #24705 -- Fixed negated Q objects in expressions.
...
Avoided split_exclude() for Q when used as an expression.
2015-05-20 09:41:04 -04:00
Anssi Kääriäinen
be9d645346
Fixed #24766 -- Added join promotion for Case expressions
2015-05-11 11:16:16 -04:00
Anssi Kääriäinen
7b05d2fdae
Fixed #24752 -- query crash when reusing Case expressions
...
Case expressions weren't copied deep enough (self.cases list was
reused resulting in an error).
2015-05-05 11:38:12 -04:00
Josh Smeaton
ceaf31adff
Fixed #24420 -- Allowed ordering by case expressions
2015-03-06 13:30:02 +11:00
Josh Smeaton
e2d6e14662
Refs #14030 -- Improved expression support for python values
2015-02-12 08:46:25 +11:00
Tim Graham
0ed7d15563
Sorted imports with isort; refs #23860 .
2015-02-06 08:16:28 -05:00
Tim Graham
33457cd3b0
Removed IPAddressField per deprecation timeline; refs #20439 .
2015-01-19 11:12:57 -05:00
Michał Modzelewski
39b58ad95a
Fixed #24148 -- Documented a bug with case expressions in SQLite < 3.7.0
2015-01-15 19:42:05 -05:00
Collin Anderson
67dbc56ec8
Made an expressions_case test work without Pillow.
2015-01-15 14:02:58 -05:00
Michał Modzelewski
65246de7b1
Fixed #24031 -- Added CASE expressions to the ORM.
2015-01-12 18:15:34 -05:00