summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/db/models.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt
index 1fa5cff80a..0f454335aa 100644
--- a/docs/topics/db/models.txt
+++ b/docs/topics/db/models.txt
@@ -950,8 +950,8 @@ If you have a ``Place`` that is also a ``Restaurant``, you can get from the
``Place`` object to the ``Restaurant`` object by using the lower-case version
of the model name::
- >>> p = Place.objects.filter(name="Bob's Cafe")
- # If Bob's Cafe is a Restaurant object, this will give the child class:
+ >>> p = Place.objects.get(id=12)
+ # If p is a Restaurant object, this will give the child class:
>>> p.restaurant
<Restaurant: ...>