Minor Models Documentation Tweak
|Reported by:||Owned by:||nobody|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~