Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#10118 closed (fixed)

Minor Models Documentation Tweak

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

Description

I didn't think the documentation regarding the exceptions thrown by model inheritance was particularly clear - it wasn't previously mentioned that the exception thrown would be a member of the subclass.

Hope this clarification makes it more obvious, or if someone else can word it better that would be good too.

diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt
index 0b82bca..58aacdc 100644
--- a/docs/topics/db/models.txt
+++ b/docs/topics/db/models.txt
@@ -927,7 +927,7 @@ of the model name::
 
 However, if ``p`` in the above example was *not* a ``Restaurant`` (it had been
 created directly as a ``Place`` object or was the parent of some other class),
-referring to ``p.restaurant`` would give an error.
+referring to ``p.restaurant`` will raise a Restaurant.DoesNotExist exception.
 
 ``Meta`` and multi-table inheritance
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Attachments (1)

0001-small-documentation-fix.patch (36.2 KB ) - added by anonymous 16 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Alex Gaynor, 16 years ago

Triage Stage: UnreviewedAccepted

Looks good by me. Would you mind uploading this as a diff(I know it's trivial, but it makes it a bit easier).

by anonymous, 16 years ago

comment:2 by peterbraden@…, 16 years ago

certainly, done.

comment:3 by Tim Graham, 16 years ago

Has patch: set
Triage Stage: AcceptedReady for checkin

comment:4 by Russell Keith-Magee, 16 years ago

Resolution: fixed
Status: newclosed

(In [9859]) Fixed #10118 -- Clarified the error message raised when accessing a subclass model that doesn't exist. Thanks to peterbraden@… for the suggestion.

comment:5 by Russell Keith-Magee, 16 years ago

(In [9869]) [1.0.X] Fixed #10118 -- Clarified the error message raised when accessing a subclass model that doesn't exist. Thanks to peterbraden@… for the suggestion.

Merge of r9859 from trunk.

comment:6 by (none), 16 years ago

milestone: post-1.0

Milestone post-1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top