Luke Cousins
391fde9e54
[5.1.x] Corrected wording in docs/ref/models/constraints.txt.
...
Backport of 579a1c99962c8697053974a70de635a997be63dc from main.
2025-02-14 15:21:40 +01:00
Clifford Gama
8ad0d09a00
[5.1.x] Fixed ambiguous pronoun reference in docs/ref/models/fields.txt.
...
Backport of 9cc3970eaaf603832c075618e61aea9ea430f719 from main.
2025-01-24 18:48:07 +01:00
Jacob Walls
b325864686
[5.1.x] Fixed #36077 -- Corrected docs on pk value where Model.save() executes an UPDATE.
...
The empty string is no longer special-cased since
c2ba59fc1da5287d6286e2c2aca4083d5bafe056.
Backport of d66137b39b1503ca3d4d4fac687251adbc845068 from main.
2025-01-13 11:20:05 +01:00
aruseni
c5ddc8550c
[5.1.x] Corrected note on importing fields in model field reference docs.
...
Backport of d7f78eb5d6c9250789fb3975b01e2a71d0e39577 from main.
2024-10-29 16:49:02 +01:00
Clifford Gama
b8277179d0
[5.1.x] Fixed typo in ref/models/fields.txt.
...
Backport of 799c3778186167eca3ed43f0e480738a607381de from main.
2024-10-29 11:32:49 +01:00
Yash
630c9e1f9d
[5.1.x] Fixed #35731 -- Extended db_default docs.
...
This added a missing db_default reference in docs/topics/db/models.txt,
and added a reference to the DatabaseDefault object.
Backport of 35ab2e018214479fa712d73f070198299ef670a1 from main.
2024-10-23 11:51:13 +02:00
Clifford Gama
9a5eae0ad8
[5.1.x] Fixed #26322 -- Consolidated lazy relationships details in docs/ref/models/fields.txt.
...
Reorganized docs to list and explain the types of lazy relationships
that can be defined in related fields.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Backport of 65f3cfce59395131f318cf1ecba144530ed6609e from main.
2024-10-17 11:42:54 -03:00
Adam Johnson
fcb71a76cc
[5.1.x] Removed outdated note about lack of subquery support in MySQL.
...
Backport of 26a67943ac5c2f196621220b24f4314d84471d07 from main.
2024-08-28 15:56:35 -03:00
Mariusz Felisiak
625aab3aea
[5.1.x] Fixed typo in docs/ref/models/expressions.txt.
...
Backport of fed11ba4617a5fa151bbabb91eb27ec01dd7c942 from main.
2024-08-28 09:09:16 -03:00
Mariusz Felisiak
20bd3f02be
[5.1.x] Used :pypi: role in docs where appropriate.
...
Backport of 304d25667433a59409e334a93acaaa9201840508 from main.
2024-08-05 10:36:41 -03:00
Adam Zapletal
bf9a89f5d1
[5.1.x] Fixed #24076 -- Added warnings on usage of dates with DateTimeField and datetimes with DateField.
...
Backport of 99273fd525129a973639044dfb12cfd732d8f1d6 from main.
2024-06-14 13:49:30 +02:00
Mariusz Felisiak
f0d592ed34
[5.1.x] Made cosmetic edits to code snippets reformatted with blacken-docs.
...
Backport of 0f694ce2ebce01356d48302c33c23902b4777537 from main.
2024-05-30 09:43:21 -03:00
Mariusz Felisiak
f030236a86
Fixed #35275 -- Fixed Meta.constraints validation crash on UniqueConstraint with OpClass().
...
This also introduces Expression.constraint_validation_compatible that
allows specifying that expression should be ignored during a constraint
validation.
2024-05-14 10:34:30 +02:00
John Parton
914bf69171
Clarified when ImageField attributes are set.
2024-05-02 10:04:55 +02:00
Mariusz Felisiak
160c0ab13a
Fixed rendering XOR section in docs.
2024-05-02 09:26:44 +02:00
Mohammad Kazemi
47c608202a
Extended docs for Q() objects mentioning the ~ (NOT) operator.
...
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2024-04-15 13:16:35 -03:00
Adam Zapletal
fd2514d17d
Added RowNumber() link in Rank() docs.
2024-03-21 05:52:07 +01:00
Mariusz Felisiak
9c17010358
Refs #34059 , Refs #34060 -- Removed outdated warning about validation of JSONField constraints.
...
Known issues have been fixed in:
- 0d8fbe2ade29f1b7bd9e6ba7a0281f5478603a43,
- c991602ce5798385261381025c06698d7fd30dc5, and
- 26aae5614487f58ddb1df5726224393887373ecd.
2024-03-18 16:11:38 +01:00
Mariusz Felisiak
36a000858b
Refs #33996 -- Updated CheckConstraint validation on NULL values on Oracle 23c+.
...
Oracle 23c supports comparing boolean expressions.
2024-03-15 12:34:54 +01:00
Simon Charette
daf7d482db
Refs #35234 -- Deprecated CheckConstraint.check in favor of .condition.
...
Once the deprecation period ends CheckConstraint.check() can become the
documented method that performs system checks for BaseConstraint
subclasses.
2024-03-01 07:15:32 +01:00
David Sanders
7714ccfeae
Refs #34964 -- Doc'd that Q expression order is preserved.
2024-02-28 11:41:06 +01:00
Adam Johnson
7ba6c9edc5
Fixed #28011 -- Corrected Field.hidden docs.
2024-02-17 17:17:23 +01:00
jordanbae
4fec1d2ce3
Fixed #34949 -- Clarified when UniqueConstraints with include/nulls_distinct are not created.
2024-01-15 13:42:02 +01:00
Aivars Kalvans
f92641a636
Fixed #28344 -- Allowed customizing queryset in Model.refresh_from_db()/arefresh_from_db().
...
The from_queryset parameter can be used to:
- use a custom Manager
- lock the row until the end of transaction
- select additional related objects
2024-01-15 10:55:14 +01:00
Salvo Polizzi
3915d4c70d
Fixed #35060 -- Deprecated passing positional arguments to Model.save()/asave().
2024-01-02 08:42:33 +01:00
Nick Pope
94b6f101f7
Fixed #29049 -- Added slicing notation to F expressions.
...
Co-authored-by: Priyansh Saxena <askpriyansh@gmail.com>
Co-authored-by: Niclas Olofsson <n@niclasolofsson.se>
Co-authored-by: David Smith <smithdc@gmail.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Abhinav Yadav <abhinav.sny.2002@gmail.com>
2023-12-30 08:24:30 +01:00
Mariusz Felisiak
0be6dde817
Corrected code-block directives in docs.
2023-12-28 19:52:15 +01:00
Viicos
e28bd6776d
Added missing import in docs/ref/models/expressions.txt.
2023-12-15 11:17:06 +01:00
KimSia Sim
c9ce764f59
Updated conditions to retrieve primary keys in bulk_create() docs.
2023-11-29 11:57:53 +01:00
Aman Pandey
0fcd72bc48
Fixed #34633 -- Made create() method of reverse many-to-one managers clear prefetch_related() cache.
2023-11-28 05:46:04 +01:00
Mariusz Felisiak
5875f03ce6
Fixed #34944 -- Made GeneratedField.output_field required.
...
Regression in f333e3513e8bdf5ffeb6eeb63021c230082e6f95.
2023-11-14 20:22:07 +01:00
Jacob Walls
427f0ed98d
Fixed typos in docs/ref/models/fields.txt.
2023-11-09 09:58:06 +03:00
Sarah Boyce
e4d012ca05
Refs #29850 -- Added exclusion support to window frames.
2023-10-30 12:04:55 +01:00
Sarah Boyce
6375cee490
Refs #29850 -- Added RowRange support for positive integer start and negative integer end.
2023-10-28 15:16:07 +02:00
Sarah Boyce
8992a0489c
Fixed typos in docs/ref/models/expressions.txt.
2023-10-28 14:21:15 +02:00
Mariusz Felisiak
718b32c691
Added missing pycon directives in various docs.
2023-10-25 12:27:27 +02:00
Tim Bell
ee104251c4
Fixed #27403 -- Doc'd that QuerySet.prefetch_related() doesn't guarantee transactional consistency.
...
Added a note about the potential race condition in prefetch_related()
that could produce an inconsistent result, one that does not correspond
to any point in the database history.
2023-10-25 09:49:33 +02:00
lufafajoshua
8adc7c86ab
Fixed #34808 -- Doc'd aggregate function's default argument.
2023-10-11 15:17:36 -03:00
David Sanders
e47298aec4
Refs #31435 -- Doc'd potential infinite recursion when accessing model fields in __init__.
2023-10-05 14:19:43 -03:00
Mariusz Felisiak
91cb2d0b48
Refs #22936 -- Doc'd Lookup.prepare_rhs.
2023-10-05 15:26:02 +02:00
Mariusz Felisiak
f9e9526800
Fixed #34873 -- Added QuerySet.explain() support for GENERIC_PLAN option on PostgreSQL 16+.
2023-09-26 12:05:26 +02:00
David Sanders
78b5c90753
Refs #34808 -- Doc'd that aggregation functions on empty groups can return None.
2023-09-21 12:14:15 -03:00
Mariusz Felisiak
3623a0c079
Fixed #34850 -- Dropped support for MariaDB 10.4.
2023-09-19 15:06:05 +02:00
Mariusz Felisiak
2abf417c81
Refs #27236 -- Removed Meta.index_together per deprecation timeline.
2023-09-18 22:12:40 +02:00
Mariusz Felisiak
295467c04a
Removed versionadded/changed annotations for 4.2.
...
This also removes remaining versionadded/changed annotations for older
versions.
2023-09-18 22:12:40 +02:00
Clément Escolano
cac94dd8aa
Fixed #33651 -- Added support for prefetching GenericForeignKey.
...
Co-authored-by: revanthgss <revanthgss@almabase.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-09-18 13:23:21 +02:00
Mariusz Felisiak
88b5b7b8e5
Corrected QuerySet.prefetch_related() note about GenericRelation().
...
GenericRelation is a reverse generic relationship so it's always
homogeneous. Mentioning this as a restriction is confusing.
2023-09-16 06:57:38 +02:00
Natalia
691f70c477
Fixed #24561 -- Added support for callables on model fields' choices.
2023-09-14 10:15:33 -03:00
Jeremy Nauta
f333e3513e
Fixed #31300 -- Added GeneratedField model field.
...
Thanks Adam Johnson and Paolo Melchiorre for reviews.
Co-Authored-By: Lily Foote <code@lilyf.org>
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-09-07 06:19:08 +02:00
Nick Pope
500e01073a
Fixed #31262 -- Added support for mappings on model fields and ChoiceField's choices.
2023-08-30 22:57:40 -03:00