diff options
| author | Simon Charette <charette.s@gmail.com> | 2016-03-31 18:27:21 -0400 |
|---|---|---|
| committer | Simon Charette <charette.s@gmail.com> | 2016-03-31 18:27:47 -0400 |
| commit | 64aba7a8aba06b8be52a1a099b44e1d3be4bdd26 (patch) | |
| tree | cf9b96fb44b38bbb22b501dec3ae3cf13608a526 /docs | |
| parent | 8928823b135b9ce2c7b18f4da0d2602b113a247e (diff) | |
Fixed #26438 -- Fixed multiple .objects typos in the docs.
Thanks Pablo OubiƱa for the report.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/options.txt | 4 | ||||
| -rw-r--r-- | docs/releases/1.10.txt | 4 | ||||
| -rw-r--r-- | docs/topics/db/optimization.txt | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt index e047a01f10..677916bf5c 100644 --- a/docs/ref/models/options.txt +++ b/docs/ref/models/options.txt @@ -132,9 +132,9 @@ Django quotes column and table names behind the scenes. >>> bar = Bar.objects.get(pk=1) >>> # Using model name "bar" as lookup string is deprecated. - >>> Foo.object.get(bar=bar) + >>> Foo.objects.get(bar=bar) >>> # You should use default_related_name "bars". - >>> Foo.object.get(bars=bar) + >>> Foo.objects.get(bars=bar) ``get_latest_by`` ----------------- diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt index 373e9744ca..c8696f8d85 100644 --- a/docs/releases/1.10.txt +++ b/docs/releases/1.10.txt @@ -804,11 +804,11 @@ lookup name is deprecated. For example, since ``default_related_name`` is set in model ``Bar``, instead of using the model name ``bar`` as the lookup:: >>> bar = Bar.objects.get(pk=1) - >>> Foo.object.get(bar=bar) + >>> Foo.objects.get(bar=bar) use the default_related_name ``bars``:: - >>> Foo.object.get(bars=bar) + >>> Foo.objects.get(bars=bar) .. _search-lookup-replacement: diff --git a/docs/topics/db/optimization.txt b/docs/topics/db/optimization.txt index 788e447050..446ec87256 100644 --- a/docs/topics/db/optimization.txt +++ b/docs/topics/db/optimization.txt @@ -161,7 +161,7 @@ So using the :ref:`example Weblog models <queryset-model-example>`:: will be quicker than: - >>> entry = Entry.object.get(headline="News Item Title") + >>> entry = Entry.objects.get(headline="News Item Title") because ``id`` is indexed by the database and is guaranteed to be unique. |
