897 Commits

Author SHA1 Message Date
Mariusz Felisiak
51f0b8ae0d [3.0.x] Fixed term warning on Sphinx 3.0.1+.
"term" role became case sensitive in Sphinx 3.0.1.
Backport of cc70a0343ef51ffcc0b1211dd6e7abedc4b43ea6 from master
2020-04-14 09:32:48 +02:00
Mariusz Felisiak
255f3f77d2 [3.0.x] Fixed Sphinx warnings on duplicate object descriptions.
Backport of 69e2cd6fed40f3ecf767609b80ad31f288446e48 from master
2020-04-07 09:49:31 +02:00
Adam Johnson
0342d47e7a [3.0.x] Prevented (and corrected) single backtick usage in docs.
Backport of 1cdfe8d91215eefaa18c398069dd9c6879a9511d from master.
2020-04-01 15:15:21 +02:00
Hasan Ramezani
aea9344139 [3.0.x] Fixed #31368 -- Doc'd 'expression' parameter of Field.from_db_value()/Expression.convert_value().
Backport of 6929f13254ce42b0a4ee5d677591d47b61023ae7 from master
2020-03-18 11:57:25 +01:00
Adam Johnson
cc20699e0a [3.0.x] Doc'd return values of as_sql() for Func and query expressions.
Backport of 8c1b073b596af23c02020879219b4e85f15a836d from master
2020-03-06 13:02:31 +01:00
Mariusz Felisiak
f389e2c960 [3.0.x] Added missing backticks in various docs.
Backport of 30ca66eadd1135d220ae1f0570bb0244c26b9d29 from master
2020-03-06 11:53:35 +01:00
Andrey Doroschenko
59ac25c93b [3.0.x] Fixed #31313 -- Fixed is_upperclass() example in enumeration types docs.
Backport of f1016814d84b1423cfe0df85644c9870a6bc6b41 from master
2020-02-27 08:33:51 +01:00
Carlton Gibson
611d1c1148 [3.0.x] Fixed #31282 -- Corrected RelatedManager docs for using add/remove/set with PKs.
Backport of 3bbf9a489afc689eff2f4a0b84af196aa1ef51e7 from master
2020-02-18 19:58:23 +01:00
Claude Paroz
789de6050a [3.0.x] Added missing backtick in instances docs.
Backport of c7b97ac3a7908dab0825f6bdb61b40f641306a8e from master
2020-01-17 20:27:48 +01:00
Carlton Gibson
57468eaff3 [3.0.x] Fixed #31124 -- Fixed setting of get_FOO_display() when overriding inherited choices.
Regression in 2d38eb0ab9f78d68c083a5b78b1eca39027b279a

Backport of 29c126bb349526b5f1cd78facbe9f25906f18563 from master
2020-01-15 15:36:28 +01:00
Simon Charette
a04e6fb355 [3.0.x] Refs #29260 -- Doc'd Model.save() behavior change in Django 3.0.
Backport of 9e14bc2135cb806b66374bac791c79344fff4ded from master
2019-12-30 08:30:49 +01:00
Taoup
b1a309f6f0 [3.0.x] Fixed #31110 -- Fixed typo in docs/ref/models/expressions.txt.
Backport of cebd41e41603c3ca77c5b29d6cd20c1bff43827f from master
2019-12-21 20:34:30 +01:00
Mariusz Felisiak
f4ed6800bd [3.0.x] Fixed #30953 -- Made select_for_update() lock queryset's model when using "self" with multi-table inheritance.
Thanks Abhijeet Viswa for the report and initial patch.
Backport of 0107e3d1058f653f66032f7fd3a0bd61e96bf782 from master
2019-12-02 07:58:04 +01:00
Baptiste Mispelon
81ddf4b164 [3.0.x] Fixed #31029 -- Used more specific links to RFCs.
Backport of ff1b19da6761217ed1b14cc7e94c6438903565d8 from master
2019-11-28 07:59:46 +01:00
Farhaan Bukhsh
78025531eb [3.0.x] Fixed #30958 -- Used a clearer example in the Cast() docs.
Backport of 4cb15450adac4003ed98f4adcb1710c95fd2b919 from master
2019-11-11 10:10:31 +01:00
kola-er
a5b4a909f0 [3.0.x] Fixed #30928 -- Clarified MySQL/MariaDB support of QuerySet.select_for_update() options.
Thanks Par Andersson for reporting the issue.

Backport of d94d7b113c21d7a0fd802fadb1adbbec8155e880 from master
2019-11-05 14:52:31 +01:00
Antonio Dudarev
213a39b4df [3.0.x] Refs #13724 -- Corrected QuerySet signature in docs.
Backport of 6c23b43655f3710cfb1ecc57236405d11a544247 from master
2019-10-22 14:24:10 +02:00
Mariusz Felisiak
368832e803 [3.0.x] Refs #29915 -- Doc'd limitation of using pattern lookups with UUIDField on PostgreSQL.
Backport of 343afa788080fb874bcd10eab1a1a2fede98c526 from master
2019-09-23 08:44:15 +02:00
Claude Paroz
c2057205d9 [3.0.x] Fixed #29823 -- Doc'd limitation of DecimalField on SQLite.
Backport of b8dff52f440adfb78b40e19ee8bff45373ca2501 from master
2019-09-14 17:23:08 +02:00
Nick Pope
4d72c14baf [3.0.x] Refs #27910 -- Improved documentation for model field choice enumeration types.
Backport of 1c66767d4e472fea27798812817b8a47c6ae22b3 from master
2019-09-13 15:38:27 +02:00
Tobias Kunze
4a954cfd11 Fixed #30573 -- Rephrased documentation to avoid words that minimise the involved difficulty.
This patch does not remove all occurrences of the words in question.
Rather, I went through all of the occurrences of the words listed
below, and judged if they a) suggested the reader had some kind of
knowledge/experience, and b) if they added anything of value (including
tone of voice, etc). I left most of the words alone. I looked at the
following words:

- simply/simple
- easy/easier/easiest
- obvious
- just
- merely
- straightforward
- ridiculous

Thanks to Carlton Gibson for guidance on how to approach this issue, and
to Tim Bell for providing the idea. But the enormous lion's share of
thanks go to Adam Johnson for his patient and helpful review.
2019-09-06 13:27:46 +02:00
Shai Berger
72ebe85a26 Fixed #27910 -- Added enumeration helpers for use in Field.choices.
These classes can serve as a base class for user enums, supporting
translatable human-readable names, or names automatically inferred
from the enum member name.

Additional properties make it easy to access the list of names, values
and display labels.

Thanks to the following for ideas and reviews:

Carlton Gibson, Fran Hrženjak, Ian Foote, Mariusz Felisiak, Shai Berger.

Co-authored-by: Shai Berger <shai@platonix.com>
Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2019-09-04 14:42:49 +02: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
Andrew
29adcd215f Fixed #30733 -- Doc'd that datetime lookups require time zone definitions in the database.
Note was missing for date, year, iso_year, week, time, hour, minute,
and second lookups.
2019-08-28 08:42:55 +02:00
Matthew Schinckel
dba749917f Doc'd for_save argument of Expression.resolve_expression(). 2019-08-27 16:54:01 +02:00
Claude Paroz
d1c2e6dd04 Refs #28428 -- Made FileField.upload_to support pathlib.Path. 2019-08-18 20:34:58 +02:00
Carlton Gibson
514efa3129 Fixed #30688 -- Clarified base_manager_name docs. 2019-08-09 10:08:06 +02:00
Nick Pope
194d1dfc18 Fixed #30661 -- Added models.SmallAutoField. 2019-08-02 11:39:01 +02:00
Étienne Beaulé
5f24e7158e Fixed #30665 -- Added support for distinct argument to Avg() and Sum(). 2019-07-31 11:22:50 +02:00
Jon Dufresne
5ed20b3aa3 Fixed #30657 -- Allowed customizing Field's descriptors with a descriptor_class attribute.
Allows model fields to override the descriptor class used on the model
instance attribute.
2019-07-25 08:15:20 +02:00
Mariusz Felisiak
230d75f59c
Refs #30547 -- Clarified that partial UniqueConstraints don't affect model validation. 2019-07-18 12:56:25 +02:00
can
febe136d4c Fixed #30397 -- Added app_label/class interpolation for names of indexes and constraints. 2019-07-08 14:57:56 +02:00
Alexey Opalev
2f91e7832f Fixed typo in docs/ref/models/indexes.txt. 2019-06-24 08:58:56 +02:00
Claude Paroz
8590726a5d Removed unneeded non-breaking spaces added in 00169bc36 2019-06-22 10:26:14 +02:00
Nadège Michel
87b1ad6e73 Fixed #30421 -- Allowed symmetrical intermediate table for self-referential ManyToManyField. 2019-06-21 15:03:17 +02:00
Mariusz Felisiak
9aeac29949
Removed unnecessary backslashes from docs. 2019-06-20 14:04:36 +02:00
Swat009
00169bc361 Fixed #30547 -- Doc'd how Meta.constraints affect model validation. 2019-06-20 10:44:02 +02:00
Vyacheslav Ver
76b3fc5c8d Fixed #30486 -- Fixed the default value of Aggregate.distinct and updated example of custom aggregate functions. 2019-06-11 11:40:48 +02:00
Caio Ariede
5248abe9b0 Fixed #30505 -- Doc'd how changes in the order of Field.choices affect migrations. 2019-06-04 14:11:41 +02:00
Brad Solomon
67b6cb7723 Fixed #30491 -- Clarified when save() on object with pk executes INSERT. 2019-05-28 11:02:26 +02:00
Mariusz Felisiak
b6c4766f53
Refs #29548 -- Updated docs for MariaDB support. 2019-05-27 19:59:49 +02:00
GwynBleidD
5402061c80 Refs #30062 -- Corrected UniqueConstraint signature in docs. 2019-05-20 10:52:57 +02:00
Jon Dufresne
e86cc14bd3 Changed docs to link to Python's description of iterable. 2019-05-17 17:27:19 +02:00
Alex
1686dce06c Fixed #30199 -- Adjusted QuerySet.get_or_create() docs to highlight atomicity warning. 2019-05-17 12:23:10 +02:00
Vyacheslav Ver
60b6a7ea9d Fixed typo in expression documentation. 2019-05-16 16:03:27 +02:00
Jon Dufresne
97d3321e89 Changed tuple choices to list in docs. 2019-05-15 14:31:42 +02:00
Tobias Kunze
a44a21a22f Fixed #26678 -- Doc'd that RelatedManager.add()/remove()/set() accepts the field the relation points to. 2019-05-07 08:55:45 +02:00
Mykola Kokalko
ef082ebb84 Fixed #29529 -- Allowed models.fields.FilePathField to accept a callable path. 2019-05-02 11:11:56 +02:00
Mariusz Felisiak
5df3301aab Fixed #30362 -- Noted partial indexes and constraints restrictions with abstract base classes.
Thanks Carlton Gibson for the review.
2019-04-25 07:36:07 +02:00
Mariusz Felisiak
f8f0f92ed9 Fixed UniqueConstraint example in ref/models/constraints.txt. 2019-04-25 07:36:07 +02:00