Commit Graph

1053 Commits

Author SHA1 Message Date
David Wobrock a320aab512 Fixed #16211 -- Added logical NOT support to F expressions. 2022-10-31 09:55:51 +01:00
Ryan Cheley 38936f6a0c
Fixed typo in docs/ref/models/querysets.txt. 2022-10-21 16:02:39 +01:00
Diane DeMers Chen a16132a9c4
Updated UTC uses to datetime.timezone.utc in docs. 2022-10-20 15:52:45 -07:00
Mariusz Felisiak 004f985b91
Refs #34059 -- Doc'd lack of support for validation of constraints with JSONFields.
Thanks Dan LaManna for the report.
2022-10-12 11:50:13 +02:00
Simon Charette c6350d594c Refs #30158 -- Removed alias argument for Expression.get_group_by_cols().
Recent refactors allowed GROUP BY aliasing allowed for aliasing to be
entirely handled by the sql.Query.set_group_by and compiler layers.
2022-10-06 12:04:00 +02:00
Lily Foote 649b28eab6 Fixed #34070 -- Added subsecond support to Now() on SQLite and MySQL. 2022-10-03 12:13:27 +02:00
David Sanders da02cbd1ef
Clarified how to reference RelatedObjectDoesNotExist exceptions. 2022-10-01 16:42:10 +02:00
Mariusz Felisiak 5d36a8266c
Changed note about update_fields and pre_save() to admonition.
Follow up to bf47c71971.
2022-09-28 09:26:10 +02:00
sarahboyce bf47c71971 Doc'd when pre_save() is called with Model.save()'s update_fields. 2022-09-27 13:46:44 +02:00
David Sanders e14d08cd89 Fixed #33996 -- Fixed CheckConstraint validation on NULL values.
Bug in 667105877e.

Thanks James Beith for the report.
2022-09-13 12:48:31 +02:00
Mariusz Felisiak 753602d0c6
Corrected heading level of "Registering and fetching lookups" section in docs. 2022-09-04 14:32:24 +02:00
Allen Jonathan David cd1afd553f Fixed #29799 -- Allowed registering lookups per field instances.
Thanks Simon Charette and Mariusz Felisiak for reviews and mentoring
this Google Summer of Code 2022 project.
2022-09-02 10:02:24 +02:00
Alex Morega de6c9c7054 Refs #30947 -- Changed tuples to lists where appropriate. 2022-08-30 09:57:17 +02:00
Simon Charette f387d024fc Refs #28333 -- Added partial support for filtering against window functions.
Adds support for joint predicates against window annotations through
subquery wrapping while maintaining errors for disjointed filter
attempts.

The "qualify" wording was used to refer to predicates against window
annotations as it's the name of a specialized Snowflake extension to
SQL that is to window functions what HAVING is to aggregates.

While not complete the implementation should cover most of the common
use cases for filtering against window functions without requiring
the complex subquery pushdown and predicate re-aliasing machinery to
deal with disjointed predicates against columns, aggregates, and window
functions.

A complete disjointed filtering implementation should likely be
deferred until proper QUALIFY support lands or the ORM gains a proper
subquery pushdown interface.
2022-08-15 08:26:26 +02:00
Carlton Gibson 5028a02352 Doc'd TextField.db_collation as optional.
Matches CharField.db_collation docs.

Thanks to Paolo Melchiorre for the report.
2022-08-02 15:16:42 +02:00
Mariusz Felisiak e20e5d1557
Fixed #33820 -- Doc'd "true"/"false"/"null" caveat for JSONField key transforms on SQLite.
Thanks Johnny Metz for the report.

Regression in 71ec102b01.
2022-07-26 20:21:27 +02:00
David Wobrock a6385b382e
Fixed #27236 -- Deprecated Meta.index_together in favor of Meta.indexes.
This also deprecates AlterIndexTogether migration operation.
2022-07-12 09:04:31 +02:00
Mariusz Felisiak eb3699ea77
Fixed #33718 -- Dropped support for MySQL 5.7. 2022-07-08 13:30:12 +02:00
Mariusz Felisiak ac90529cc5 Fixed docs build with sphinxcontrib-spelling 7.5.0+.
sphinxcontrib-spelling 7.5.0+ includes captions of figures in the set
of nodes for which the text is checked.
2022-05-31 11:17:01 +02:00
Mariusz Felisiak 90aabd730a
Fixed #33724 -- Doc'd exclude argument changes in model validation.
Thanks אורי for the report.

Follow up to 1ea7e3157d.
2022-05-24 10:02:53 +02:00
Mariusz Felisiak 981c23c0cc
Fixed #33717 -- Dropped support for PostgreSQL 11. 2022-05-19 09:26:48 +02:00
Joachim Jablon ce7321932d Refs #30581 -- Updated count of steps in model validation docs.
Follow-up to 667105877e.
2022-05-18 11:38:15 +02:00
Carlton Gibson ca1c3151c3 Removed versionadded/changed annotations for 4.0. 2022-05-17 14:22:06 +02:00
Mariusz Felisiak 68da6b389c
Fixed #33543 -- Deprecated passing nulls_first/nulls_last=False to OrderBy and Expression.asc()/desc().
Thanks Allen Jonathan David for the initial patch.
2022-05-12 11:30:03 +02:00
Gagaro 667105877e Fixed #30581 -- Added support for Meta.constraints validation.
Thanks Simon Charette, Keryn Knight, and Mariusz Felisiak for reviews.
2022-05-10 11:22:23 +02:00
Ali Toosi faab9e6769 Fixed #33680 -- Corrected example of customizing model loading in docs. 2022-05-06 06:42:03 +02:00
Mariusz Felisiak 37470bbd90
Fixed #33675 -- Dropped support for PostgreSQL 10 and PostGIS 2.4. 2022-05-04 06:28:51 +02:00
David ce586ed693 Removed hyphen from pre-/re- prefixes.
"prepopulate", "preload", and "preprocessing" are already in the
spelling_wordlist.

This also removes hyphen from double "e" combinations with "pre" and
"re", e.g. preexisting, preempt, reestablish, or reenter.

See also:
- https://ahdictionary.com/word/search.html?q=rerun
- https://ahdictionary.com/word/search.html?q=recreate
- https://ahdictionary.com/word/search.html?q=predetermined
- https://ahdictionary.com/word/search.html?q=reuse
- https://ahdictionary.com/word/search.html?q=reopening
2022-04-28 10:44:14 +02:00
Andrew Godwin 58b27e0dbb Fixed #33646 -- Added async-compatible interface to QuerySet.
Thanks Simon Charette for reviews.

Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-04-26 20:25:23 +02:00
Hannes Ljungberg 6f311c7e35 Refs #33508 -- Corrected note about MySQL/MariaDB support of index ordering. 2022-04-20 17:45:23 +02:00
Sih Sîng-hông薛丞宏 d4bf3b4c75 Corrected models.FileField signature in docs. 2022-03-28 13:25:39 +02:00
Carlton Gibson bb61f0186d Refs #32365 -- Removed internal uses of utils.timezone.utc alias.
Remaining test case ensures that uses of the alias are mapped
canonically by the migration writer.
2022-03-24 06:29:50 +01:00
Mariusz Felisiak 39ae8d740e
Added missing backticks to function names. 2022-03-17 11:10:03 +01:00
Gagaro 9c04af837a Doc'd BaseConstraint. 2022-03-16 16:55:17 +01:00
David Smith 67b5f506a6
Changed some words to use inline markup. 2022-03-10 10:18:31 +01:00
Ryan Heard c6b4d62fa2 Fixed #29865 -- Added logical XOR support for Q() and querysets. 2022-03-04 12:55:37 +01:00
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
Jacob Walls edbf930287 Fixed #29984 -- Added QuerySet.iterator() support for prefetching related objects.
Co-authored-by: Raphael Kimmig <raphael.kimmig@ampad.de>
Co-authored-by: Simon Charette <charette.s@gmail.com>
2022-01-25 06:12:04 +01:00
sean_c_hsu 0f6946495a Fixed #31685 -- Added support for updating conflicts to QuerySet.bulk_create().
Thanks Florian Apolloner, Chris Jerdonek, Hannes Ljungberg, Nick Pope,
and Mariusz Felisiak for reviews.
2022-01-19 20:17:42 +01:00
Mariusz Felisiak 4400d8568a
Fixed #33391 -- Clarified Aggregate.empty_result_set_value docs. 2021-12-31 06:49:10 +01:00
Mariusz Felisiak ad6bb20557
Avoided counting attributes and methods in docs. 2021-12-28 12:36:57 +01:00
Beomsoo Kim 7e4a9a9f69
Corrected example in models.DecimalField docs. 2021-12-13 07:20:35 +01:00
Ömer Faruk Abacı f04b44bad4 Refs #33319 -- Added note about commutation of QuerySet's | operator. 2021-12-08 21:16:24 +01:00
Hannes Ljungberg 1eaf38fa87 Fixed #33335 -- Made model validation ignore functional unique constraints.
Regression in 3aa545281e.

Thanks Hervé Le Roy for the report.
2021-12-06 07:59:11 +01:00
Shivam Durgbuns d75c387f46 Fixed #33334 -- Alphabetized form and model fields in reference docs. 2021-12-02 08:33:26 +01:00
Simon Charette aec71aaa5b Fixed #33304 -- Allowed passing string expressions to Window(order_by). 2021-11-23 07:58:44 +01:00
Mariusz Felisiak a17becf4c7
Corrected signatures of QuerySet's methods. 2021-11-23 07:04:04 +01:00
Nick Frazier 0d4e575c96 Fixed #33198 -- Corrected BinaryField.max_length docs. 2021-10-18 07:27:00 +02:00
Jacob Walls cd6bddd44e Fixed #22224 -- Added note about supplying missing values for non-nullable fields with blank=True. 2021-10-05 06:09:54 +02:00
Hannes Ljungberg d400b08a8b
Fixed #32888 -- Doc'd that select_for_update() only locks tables with selected columns. 2021-10-04 10:20:34 +02:00