Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #12345 -- Fixed bug in db/models.txt.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12188 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 74f88194c3f16b35dd2bc8133cc7a2f97d2f7221 1 parent 287de02
@adrianholovaty adrianholovaty authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 docs/topics/db/models.txt
View
4 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: ...>
Please sign in to comment.
Something went wrong with that request. Please try again.