Opened 7 years ago

Closed 6 years ago

Last modified 6 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: UI/UX:

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 7 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 7 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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

Changed 7 years ago by anonymous

comment:2 Changed 7 years ago by peterbraden@…

certainly, done.

comment:3 Changed 6 years ago by timo

  • Has patch set
  • Triage Stage changed from Accepted to Ready for checkin

comment:4 Changed 6 years ago by russellm

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

(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 Changed 6 years ago by russellm

(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 Changed 6 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

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