Commit graph

659 commits

Author SHA1 Message Date
Tim Graham
260bc84901 [1.10.x] Fixed #28561 -- Removed inaccurate docs about QuerySet.order_by() and joins.
As of ccbba98131, both examples don't use
a join.

Backport of 44a6c27fd4 from master
2017-09-06 19:32:27 -04:00
Michael
db7dfbff53 [1.10.x] Fixed #28568 -- Fixed typo in docs/ref/models/database-functions.txt.
And made an example use naming consistent with the rest of the doc.

Backport of 3f2b1d926b from master
2017-09-04 14:41:26 -04:00
Lachlan Musicman
7b2d4a95dc [1.10.x] Fixed #28266 -- Fixed typo in docs/ref/models/instances.txt.
Backport of 00093daec9 from master
2017-06-02 09:17:45 -04:00
lb1c
e0bd66d024 [1.10.x] Fixed incorrect import in docs/ref/models/expressions.txt.
Backport of 36f2262741 from master
2017-03-15 08:10:15 -04:00
Tim Graham
f38f2032c5 Used a nontemporal example in QuerySet.bulk_create() in docs. 2016-12-27 10:00:03 -05:00
Tim Graham
2f95b91bbe [1.10.x] Made cosmetic edits to the "What happens when you save?" docs.
Backport of e2112a5e1a from master
2016-12-17 12:06:34 -05:00
Perry Roper
c2aa836c4f [1.10.x] Added Prefetch import to first use in QuerySet docs.
Backport of 3be2268992 from master
2016-12-14 13:57:32 -05:00
Simon Charette
4074fa9145 [1.10.x] Replaced RawSQL with Cast in Coalesce doc example.
Backport of ad8f6a45eb from master
2016-11-30 12:08:43 -05:00
Tim Graham
59ea6fd686 [1.10.x] Fixed #27511 -- Corrected Field.related_model docs about GenericRelation.
Backport of 55adfc0760 from master
2016-11-21 12:53:35 -05:00
Jonatas CD
02ac92888e [1.10.x] Fixed #27482 -- Doc'd an example of Case() in QuerySet.filter().
Backport of b28c6ca763 from master
2016-11-17 12:39:56 -05:00
Jonatas CD
af0f01558b [1.10.x] Fixed #26985 -- Doc'd that ForeignKey.to_field reference must be unique.
Backport of 9da45ff352 from master
2016-11-15 11:21:58 -05:00
Tim Graham
3dc480fcd2 [1.10.x] Inlined a note in docs/ref/models/expressions.txt.
Backport of 0d6c7cae7c from master
2016-11-09 08:21:17 -05:00
Jop Reyntjes
89d960121d [1.10.x] Fixed #27414 -- Doc'd that F() expressions on relations return pk values.
Backport of f8fab6f902 from master
2016-11-09 07:13:24 -05:00
Marti Raudsepp
ae91fc786c [1.10.x] Updated postgresql.org links to https and made them canonical.
Backport of 51fbe2a60d from master
2016-10-25 11:43:54 -04:00
Tim Graham
e781197d1c [1.10.x] Fixed #27342 -- Corrected QuerySet.update_or_create() example.
Backport of 51b83d9e51 from master
2016-10-13 11:03:09 -04:00
Tim Graham
be535960b1 [1.10.x] Fixed #25475 -- Doc'd how to use a literal % in Func.template.
Backport of c60feb6999 from master
2016-10-07 10:25:07 -04:00
Adam Chainz
27d352800c [1.10.x] Doc'd that model instances with pk=None don't compare equal.
Backport of 224fe22bf1 from master
2016-10-07 09:02:10 -04:00
Tim Graham
c37e170f7a [1.10.x] Updated links to the current version of MySQL docs.
Backport of 9819676676 from master
2016-09-30 09:15:49 -04:00
zhuanyenan
ddd77d5fd3 [1.10.x] Corrected docs for return type of Field.formfield().
Backport of 17677d510f from master
2016-09-17 14:28:08 -04:00
Simon Charette
23cf7e50d1 [1.10.x] Fixed #27209 -- Fixed typo in docs/ref/models/database-functions.txt.
Thanks Valentin Ignatyev for the report.

Backport of 767ba00976 from master
2016-09-12 08:07:43 -04:00
Abhishek Bera
a77d979cbd [1.10.x] Fixed #26987 -- Documented using QuerySet.get() without arguments.
Backport of f3b601f11a from master
2016-08-19 17:17:57 -04:00
Victor Oliveira da Silva
dad8ec49c4 [1.10.x] Made cosmetic edits to Field.default docs.
Backport of d7804662f8 from master
2016-08-15 10:46:02 -04:00
Tim Graham
eea74edc70 [1.10.x] Fixed #27048 -- Documented that refresh_from_db() doesn't reload @cached_properties.
Backport of 9556005425 from master
2016-08-12 18:49:42 -04:00
Tim Graham
a4df6577df [1.10.x] Fixed #26925 -- Linked aggregation ordering topic from Meta.ordering docs.
Backport of 3aaf6cf0f3 from master
2016-07-25 06:25:26 -04:00
petedmarsh
5cc6190788 [1.10.x] Fixed #26899 -- Documented why RawSQL params is a required parameter.
Backport of 7bf3ba0d0c from master
2016-07-21 10:29:06 -04:00
Tim Graham
6646a396cc [1.10.x] Fixed inconsistent indentation in docs/ref/models/options.txt
Backport of ba246bd5fe from master
2016-07-15 13:43:05 -04:00
Simon Charette
cf6f0e9978 [1.10.x] Refs #25774 -- Adjusted datetime database function docs field names.
Backport of 90468079ec from master
2016-07-08 12:37:24 -04:00
Romain Garrigues
8976d08edb [1.10.x] Fixed #25461 -- Corrected meta API code examples to account for MTI.
In the case of multiple-table inheritance models, get_all_related_objects() and
get_all_related_objects_with_model() don't return the auto-created
OneToOneField, but the new examples didn't account for this.

Backport of 8be84e2ac4 from master
2016-07-06 09:28:51 -04:00
Tsering
be03ce25c4 [1.10.x] Refs #23386 -- Documented that F() expressions are applied on each model.save()
Backport of fc4b4fd585 from master
2016-06-28 16:27:36 -04:00
Tim Graham
45a650777e [1.10.x] Fixed #26787 -- Documented deleting and reloading of model instance fields.
Thanks Julien Hartmann for the report.

Backport of 20d1cb33c2 from master
2016-06-21 15:25:16 -04:00
Sergey Fedoseev
f9b3a6a76f [1.10.x] Refs #14030 -- Updated docs per "Improved expression support for python values."
Complements e2d6e14662.

Backport of db613f4f12 from master
2016-06-15 10:35:34 -04:00
Ed Henderson
521772ff07 [1.10.x] Fixed #26021 -- Applied hanging indentation to docs.
Backport of 4a4d7f980e from master
2016-06-03 11:49:24 -04:00
Chad Shryock
cd4246aab1 [1.10.x] Fixed #26526 -- Documented QuerySet.latest()'s dependency on database ordering.
Backport of e6c5e68acd from master
2016-06-02 19:42:57 -04:00
Florian Apolloner
7bc199aa64 [1.10.x] Fixed a typo in the docs.
Backport of 62e4f8ec43 from master
2016-05-31 10:59:25 -04:00
Ketan Bhatt
c2dde7561a [1.10.x] Fixed #26679 -- Documented which methods are disabled on RelatedManager if there's an intermediate table.
Backport of 59523c06fe from master
2016-05-31 07:15:15 -04:00
Nick Smith
06db2b88cf [1.10.x] Fixed typo in docs/ref/models/querysets.txt
Backport of 838386815f from master
2016-05-27 09:13:12 -04:00
Marti Raudsepp
b9ae662c97 Fixed #26620 -- Made Model.refresh_from_db() fail when passed unknown kwargs. 2016-05-18 09:27:23 -04:00
Josh Smeaton
2a4af0ea43 Fixed #25774 -- Refactor datetime expressions into public API 2016-05-18 20:14:58 +10:00
Loïc Bistuer
ed0ff913c6 Fixed #10506, #13793, #14891, #25201 -- Introduced new APIs to specify models' default and base managers.
This deprecates use_for_related_fields.

Old API:

class CustomManager(models.Model):
    use_for_related_fields = True

class Model(models.Model):
    custom_manager = CustomManager()

New API:

class Model(models.Model):
    custom_manager = CustomManager()

    class Meta:
        base_manager_name = 'custom_manager'

Refs #20932, #25897.

Thanks Carl Meyer for the guidance throughout this work.
Thanks Tim Graham for writing the docs.
2016-05-17 12:07:22 +07:00
Tim Graham
e475e84970 Refs #26021 -- Used hanging indentation in some doc examples. 2016-05-14 19:06:31 -04:00
Tim Graham
f5ff5010cd Fixed #26483 -- Updated docs.python.org links to use Intersphinx. 2016-05-08 18:07:43 -04:00
Tobias McNulty
dbd99de6fa Fixed #26508 -- Clarified docs for various FieldFile methods. 2016-05-07 12:16:42 -04:00
Claude Paroz
388bb5bd9a Fixed #22936 -- Obsoleted Field.get_prep_lookup()/get_db_prep_lookup()
Thanks Tim Graham for completing the initial patch.
2016-05-04 20:02:01 +02:00
Ville Skyttä
575a9a791e Normalized "an SQL" spelling. 2016-05-03 19:30:48 -04:00
Vasiliy Faronov
ac77c55bc5 Fixed #26567 -- Updated references to obsolete RFC2616.
Didn't touch comments where it wasn't obvious that the code adhered to
the newer standard.
2016-05-03 11:14:40 -04:00
Anssi Kääriäinen
7f51876f99 Fixed #26207 -- Replaced dynamic classes with non-data descriptors for deferred instance loading. 2016-04-29 13:06:32 -04:00
Tim Graham
f945fb24a3 Fixed #26554 -- Updated docs URLs to readthedocs.io 2016-04-28 10:09:57 -04:00
Tim Graham
a755e0657e Removed unused BaseExpression.refs_aggregate().
Unused since afe0bb7b13.
2016-04-22 13:04:13 -04:00
Tim Graham
5ac7c8f7ab Refs #22268 -- Fixed typo in docs/ref/models/querysets.txt 2016-04-08 11:43:02 -04:00
Iacopo Spalletti
7d485d5d75 Fixed #22268 -- Documented values_list() behavior for multivalued relations.a
Thanks Sai Krishna for the initial patch.
2016-04-02 07:20:11 -04:00