908 Commits

Author SHA1 Message Date
Ramiro Morales
b732afe30a [3.0.x] Fixed typo in docs/ref/models/querysets.txt.
Backport of 51e536178cba9489b9d759f69f72f442af16ba32 from master
2020-07-22 23:37:44 +02:00
Adam Johnson
76b7b3a778 [3.0.x] Doc'd Model.MultipleObjectsReturned docs and improved documentation related with models exceptions.
Backport of bc4fea92b296a7eacbd5f89263ca67515feeb53f from master
2020-07-22 20:22:09 +02:00
Adam Johnson
f026d761d6 [3.0.x] Refs #24763 -- Moved DoesNotExist to Model class docs.
Backport of b5f0efa19c82d274082bcde8a8acae5038667614 from master
2020-07-22 20:22:06 +02:00
Adam Johnson
5bd7c18306 [3.0.x] Improved ManyToManyField.through docs.
Backport of e7fa8aff432a90b6df9914d63aad239164b6b4d4 from master
2020-07-17 10:48:32 +02:00
Tim Park
b66588abe2 [3.0.x] Fixed #31502 -- Documented Model._state.db and Model._state.adding
Backport of 697e59d5cf81e6c7e4a06ca98d6e3e16cea486dc from master
2020-07-08 10:07:23 +02:00
Steven Pousty
9b9083981a [3.0.x] Fixed #31743 -- Doc't that managed=False prevents Django from managing tables modifications.
Backport of d2c135da4c75079e45661ec609bd72f27dddf2a9 from master
2020-06-26 09:59:20 +02:00
Tobias Krönke
0afe8ba2d6 [3.0.x] Fixed #31689 -- Doc'd caveat about using bulk_create()'s ignore_conflicts on MariDB and MySQL.
Backport of 69e0d9c553bb55dde8d7d1d479a78bfa7093f406 from master
2020-06-15 12:54:01 +02:00
Hasan Ramezani
b80c5baf29 [3.0.x] Fixed #31650 -- Added note uniqueness of constraints names in docs.
Backport of 55556e51fb152c864ddc782d9b56e8b785ccf8bc from master
2020-06-04 07:39:08 +02:00
Adam Johnson
cdf320dfb2 [3.0.x] Fixed a/an typos in "SQL" usage.
Backport of 1c2c6f1b51a540bddc7ae95f4d1213688411ca44 from master
2020-05-06 06:36:16 +02:00
Adam Johnson
883362b6a7 [3.0.x] Corrected models.FilePathField signature in docs.
Backport of 787981f9d1d5abc489a0b069e3353b8ad7aa9778 from master
2020-05-04 12:40:33 +02:00
Hasan Ramezani
657992cf19 [3.0.x] Fixed #31514 -- Fixed default form widgets in model fields docs.
Backport of d6db186427d33889e4d2f3b56e02807d51fc0376 from master
2020-04-25 21:21:29 +02:00
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