diff options
| author | Maxime Lorant <maxime.lorant@gmail.com> | 2017-01-09 23:00:44 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-01-09 17:00:44 -0500 |
| commit | 241e1e3cd7669c5d8869ad4297b9edf6046ed7f0 (patch) | |
| tree | 2e08a72ed71c262d686dbbcb0d765a1dccc5d2db | |
| parent | 823af53bf6ee031b3dd680fe817d60d69b697fef (diff) | |
Removed SHOUTING in doc examples.
| -rw-r--r-- | docs/topics/db/models.txt | 6 | ||||
| -rw-r--r-- | docs/topics/db/queries.txt | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt index 1d07d3db6f..07caa00b02 100644 --- a/docs/topics/db/models.txt +++ b/docs/topics/db/models.txt @@ -513,11 +513,9 @@ the intermediate model:: Unlike normal many-to-many fields, you *can't* use ``add()``, ``create()``, or ``set()`` to create relationships:: - >>> # THIS WILL NOT WORK + >>> # The following statements will not work >>> beatles.members.add(john) - >>> # NEITHER WILL THIS >>> beatles.members.create(name="George Harrison") - >>> # AND NEITHER WILL THIS >>> beatles.members.set([john, paul, ringo, george]) Why? You can't just create a relationship between a ``Person`` and a ``Group`` @@ -539,7 +537,7 @@ information as to which intermediate model instance should be deleted:: ... invite_reason="You've been gone for a month and we miss you.") >>> beatles.members.all() <QuerySet [<Person: Ringo Starr>, <Person: Paul McCartney>, <Person: Ringo Starr>]> - >>> # THIS WILL NOT WORK BECAUSE IT CANNOT TELL WHICH MEMBERSHIP TO REMOVE + >>> # This will not work because it cannot tell which membership to remove >>> beatles.members.remove(ringo) However, the :meth:`~django.db.models.fields.related.RelatedManager.clear` diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt index f1540cbb96..21ae388fa8 100644 --- a/docs/topics/db/queries.txt +++ b/docs/topics/db/queries.txt @@ -1059,7 +1059,7 @@ introduce joins when you use ``F()`` objects in an update -- you can only reference fields local to the model being updated. If you attempt to introduce a join with an ``F()`` object, a ``FieldError`` will be raised:: - # THIS WILL RAISE A FieldError + # This will raise a FieldError >>> Entry.objects.update(headline=F('blog__name')) .. _topics-db-queries-related: |
