1011 Commits

Author SHA1 Message Date
Sih Sîng-hông薛丞宏
7f69c0d9f7 [4.0.x] Corrected models.FileField signature in docs.
Backport of d4bf3b4c75c0e1229062ad4c937725931f699fb7 from main
2022-03-28 20:29:53 +02:00
Mariusz Felisiak
1af06ffaa5 [4.0.x] Added missing backticks to function names.
Backport of 39ae8d740e30c18e46873cf82aff76588f1974c7 from main
2022-03-17 11:10:49 +01:00
Mariusz Felisiak
fe59bf202d [4.0.x] Fixed #33391 -- Clarified Aggregate.empty_result_set_value docs.
Backport of 4400d8568ad5695c46e8de45635a82a27a26b871 from main
2021-12-31 06:49:55 +01:00
Beomsoo Kim
c607ee949d [4.0.x] Corrected example in models.DecimalField docs.
Backport of 7e4a9a9f696574a18f5c98f34d5a88e254b2d394 from main
2021-12-13 07:20:56 +01:00
Ömer Faruk Abacı
bb8435f5db [4.0.x] Refs #33319 -- Added note about commutation of QuerySet's | operator.
Backport of f04b44bad40369ec2df74b16adb4d3f09350e4b2 from main
2021-12-08 21:59:40 +01:00
Hannes Ljungberg
fed7f992ac [4.0.x] Fixed #33335 -- Made model validation ignore functional unique constraints.
Regression in 3aa545281e0c0f9fac93753e3769df9e0334dbaa.

Thanks Hervé Le Roy for the report.

Backport of 1eaf38fa87384fe26d1abf6e389d6df1600d4d8c from main
2021-12-06 13:28:54 +01:00
Shivam Durgbuns
306fbf197a [4.0.x] Fixed #33334 -- Alphabetized form and model fields in reference docs.
Backport of d75c387f46c55459a2daf071e5463bad0ad7dcbd from main
2021-12-02 10:12:31 +01:00
Mariusz Felisiak
70b05c5374 [4.0.x] Corrected signatures of QuerySet's methods.
Backport of a17becf4c7f4e4057e8c94990e4b4999be0aea95 from main
2021-11-23 07:04:59 +01:00
Nick Frazier
f5fd03aebe [4.0.x] Fixed #33198 -- Corrected BinaryField.max_length docs.
Backport of 0d4e575c96d408e0efb4dfd0cbfc864219776950 from main
2021-10-18 08:24:08 +02:00
Jacob Walls
515d3c591c [4.0.x] Fixed #22224 -- Added note about supplying missing values for non-nullable fields with blank=True.
Backport of cd6bddd44e0a1c3c6a96a3677f8366ef0e4b6782 from main
2021-10-05 06:37:59 +02:00
Hannes Ljungberg
816e809302 [4.0.x] Fixed #32888 -- Doc'd that select_for_update() only locks tables with selected columns.
Backport of d400b08a8baa697905daadd47a6ba12336e93336 from main
2021-10-04 10:21:08 +02:00
David Wobrock
aab76433ed [4.0.x] Fixed #33141 -- Renamed Expression.empty_aggregate_value to empty_result_set_value.
Backport of ad36a198a12df4dff65992191b3eb0a474e2daac from main
2021-09-29 20:52:59 +02:00
Carlton Gibson
306607d5b9 Fixed #32365 -- Made zoneinfo the default timezone implementation.
Thanks to Adam Johnson, Aymeric Augustin, David Smith, Mariusz Felisiak, Nick
Pope, and Paul Ganssle for reviews.
2021-09-16 12:11:05 +02:00
David Sanders
ecf76cc1fb Clarified type of Window()'s partition_by and order_by arguments. 2021-09-10 11:49:51 +02:00
Hasan Ramezani
0a28b42b15 Fixed #33084 -- Removed incorrect system check for ManyToManyField with limit_choices_to. 2021-09-09 12:07:59 +02:00
Can Sarıgöl
7ea86076fc Fixed #33046 -- Added note about using length of cached result by QuerySet.count(). 2021-08-26 06:48:33 +02:00
David Smith
fbb1984046
Refs #32956 -- Updated words ending in -wards.
AP styleguide: Virtually none of the words ending with -wards end with
an s.
2021-07-30 20:34:50 +02:00
Abhyudai
85d47a58bf
Made minor edits to QuerySet.update_or_create() docs. 2021-07-29 06:51:09 +02:00
David Smith
1024b5e74a Fixed 32956 -- Lowercased spelling of "web" and "web framework" where appropriate. 2021-07-29 06:24:12 +02:00
abhiabhi94
f876c7d08e Fixed #32957 -- Improved visibility of arguments sections in Model.save() docs. 2021-07-26 07:23:01 +02:00
Nick Pope
501a8db465 Fixed #10929 -- Added default argument to aggregates.
Thanks to Simon Charette and Adam Johnson for the reviews.
2021-07-19 13:04:27 +02:00
Ian Foote
f42ccdd835 Fixed #27021 -- Allowed lookup expressions in annotations, aggregations, and QuerySet.filter().
Thanks Hannes Ljungberg and Simon Charette for reviews.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-09 11:43:06 +02:00
Mariusz Felisiak
77b88fe621
Fixed #32908 -- Allowed select_for_update(skip_locked) on MariaDB 10.6+. 2021-07-08 06:51:10 +02:00
Claude Paroz
7309393c3a Documented in_bulk behavior with nonexistent id_list items.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2021-07-07 10:13:32 +02:00
Simon Charette
9f3cce172f Refs #26430 -- Re-introduced empty aggregation optimization.
The introduction of the Expression.empty_aggregate_value interface
allows the compilation stage to enable the EmptyResultSet optimization
if all the aggregates expressions implement it.

This also removes unnecessary RegrCount/Count.convert_value() methods.
Disabling the empty result set aggregation optimization when it wasn't
appropriate prevented None returned for a Count aggregation value.

Thanks Nick Pope for the review.
2021-07-02 07:25:42 +02:00
abhiabhi94
cd124295d8 Fixed #32381 -- Made QuerySet.bulk_update() return the number of objects updated.
Co-authored-by: Diego Lima <diego.lima@lais.huol.ufrn.br>
2021-06-29 06:58:46 +02:00
Girish Sontakke
27d4573d35
Fixed #32755 -- Corrected Model.get_absolute_url() example in docs. 2021-05-18 11:30:38 +02:00
Nick Pope
88b3982af3 Fixed a typo in docs/ref/models/fields.txt.
datetime.date.utcnow() doesn't exist, should be .today().
2021-05-12 11:06:29 +02:00
Mariusz Felisiak
ca98729055
Fixed #32645 -- Fixed QuerySet.update() crash when ordered by joined fields on MySQL/MariaDB.
Thanks Matt Westcott for the report.

Regression in 779e615e362108862f1681f965ee9e4f1d0ae6d2.
2021-04-14 21:11:17 +02:00
girishsontakke
98abc0c90e Fixed #32501 -- Added support for returning fields from INSERT statements on SQLite 3.35+. 2021-04-07 20:09:56 +02:00
Nick Pope
2f13c476ab Fixed #31487 -- Added precision argument to Round(). 2021-03-29 09:43:08 +02:00
Claude Paroz
cac9ec73db Refs #31003 -- Moved note about return value of QuerySet.bulk_create() to the first paragraph. 2021-03-25 17:46:22 +01:00
Simon Willison
e53159747c Doc'd that RawSQL can be used with __in. 2021-03-25 10:28:20 +01:00
Nick Pope
41e39c41c9 Refs #32460 -- Doc'd and tested that property names of model choice enums cannot be used as members. 2021-03-24 07:45:33 +01:00
Mariusz Felisiak
71ec102b01 Fixed #32483 -- Fixed QuerySet.values()/values_list() on JSONField key transforms with booleans on SQLite.
Thanks Matthew Cornell for the report.
2021-03-23 08:28:47 +01:00
Johan Schiff
d01709aae2 Fixed #24141 -- Added QuerySet.contains(). 2021-03-06 20:40:29 +01:00
Mariusz Felisiak
c6b07627fc
Refs #32483 -- Doc'd caveat about using JSONField key transforms to booleans with QuerySet.values()/values_list() on SQLite. 2021-03-04 11:30:06 +01:00
Hannes Ljungberg
3aa545281e Fixed #30916 -- Added support for functional unique constraints.
Thanks Ian Foote and Mariusz Felisiak for reviews.
2021-02-23 20:19:53 +01:00
Timothy McCurrach
241da3f06e Fixed #32388 -- Clarified QuerySet.bulk_update() caveat about duplicates for multiple batches. 2021-01-28 07:54:03 +01:00
Jack
2b4b6c8af0
Refs #32372 -- Updated manager name in related objects reference docs.
Follow up to 725c549ae7a34d83447201da7190f8d71c7fc2fc.
2021-01-22 20:18:44 +01:00
Jack Aitken
725c549ae7 Fixed #32372 -- Made examples in related objects reference docs consistent. 2021-01-22 06:33:33 +01:00
Mariusz Felisiak
d992f4e3c2 Refs #31369 -- Removed models.NullBooleanField per deprecation timeline. 2021-01-14 17:50:04 +01:00
Mariusz Felisiak
396da8b94c Refs #30841 -- Made isnull lookup raise ValueError for non-boolean values.
Per deprecation timeline.
2021-01-14 17:50:04 +01:00
Mariusz Felisiak
b7dd89ed53 Removed versionadded/changed annotations for 3.1. 2021-01-14 17:50:04 +01:00
Hannes Ljungberg
83fcfc9ec8 Fixed #26167 -- Added support for functional indexes.
Thanks Simon Charette, Mads Jensen, and Mariusz Felisiak for reviews.

Co-authored-by: Markus Holtermann <info@markusholtermann.eu>
2021-01-13 11:47:50 +01:00
Mariusz Felisiak
fdc3d9dcaf
Removed unused import in docs/ref/models/expressions.txt. (#13879) 2021-01-12 10:51:38 +01:00
Iuri de Silvio
02391bc98c
Fixed #32313 -- Corrected QuerySet.in_bulk() signature. 2021-01-11 08:00:49 +01:00
Hasan Ramezani
3eb98743dc
Fixed #32315 -- Doc'd FieldFile.path. 2021-01-07 12:51:59 +01:00
Alexander Lyabah
415f50298f Fixed #32231 -- Allowed passing None params to QuerySet.raw(). 2021-01-05 10:37:11 +01:00
Fabio Sangiovanni
2d6c9b97bc Fixed #32310 -- Fixed note about reverse accessors for intermediate table for self-referential ManyToManyField. 2021-01-04 20:16:07 +01:00