Code

Opened 4 years ago

Closed 4 years ago

#12345 closed (fixed)

incorrect invoking in the example of Multi-table inheritance section

Reported by: anonymous Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: typo
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Refs http://code.djangoproject.com/browser/django/trunk/docs/topics/db/models.txt?rev=10818#L926 .

p = Place.objects.filter(name="Bob's Cafe")
# If Bob's Cafe is a Restaurant object, this will give the child class:
>>> p.restaurant
<Restaurant: ...>

p is a QuerySet here and p.restaurant has no sense. following maybe better.

p = Place.objects.get(name="Bob's Cafe")

Attachments (1)

12345.diff (540 bytes) - added by timo 4 years ago.
typo

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by timo

typo

comment:1 Changed 4 years ago by timo

  • Has patch set
  • Keywords typo added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 4 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [12188]) Fixed #12345 -- Fixed bug in db/models.txt.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.