diff options
| author | Tim Graham <timograham@gmail.com> | 2013-05-19 11:30:26 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-05-19 11:34:25 -0400 |
| commit | 66005c643c806995ff8430f1b66a3fb779418de0 (patch) | |
| tree | 628c77bcd58def9bdf2ec98d863af9d455672a34 | |
| parent | 694f4ff9e28aac1ec0309fd379b4b53067c6c52f (diff) | |
[1.5.X] Fixed #20183 - Clarified docs assumption that certain objects exist in database.
Thanks Tomasz Jaskowski for the patch.
Backport of 41bea033b7 from master
| -rw-r--r-- | docs/topics/db/queries.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt index a6c369806e..cc55bd93b2 100644 --- a/docs/topics/db/queries.txt +++ b/docs/topics/db/queries.txt @@ -100,7 +100,8 @@ Saving ``ForeignKey`` and ``ManyToManyField`` fields Updating a :class:`~django.db.models.ForeignKey` field works exactly the same way as saving a normal field -- simply assign an object of the right type to the field in question. This example updates the ``blog`` attribute of an -``Entry`` instance ``entry``:: +``Entry`` instance ``entry``, assuming appropriate instances of ``Entry`` and +``Blog`` are already saved to the database (so we can retrieve them below):: >>> from blog.models import Entry >>> entry = Entry.objects.get(pk=1) |
