Author: mtredinnick
Date: 2008-10-24 02:15:52 -0500 (Fri, 24 Oct 2008)
New Revision: 9257
Modified:
django/trunk/docs/ref/models/querysets.txt
Log:
Fixed #9420 -- Fixed an exception type in the documentation of Queryset.get().
Based on a suggestion from daveyjoe.
Modified: django/trunk/docs/ref/models/querysets.txt
===================================================================
--- django/trunk/docs/ref/models/querysets.txt 2008-10-24 07:15:07 UTC (rev
9256)
+++ django/trunk/docs/ref/models/querysets.txt 2008-10-24 07:15:52 UTC (rev
9257)
@@ -743,11 +743,13 @@
Returns the object matching the given lookup parameters, which should be in
the format described in `Field lookups`_.
-``get()`` raises ``AssertionError`` if more than one object was found.
+``get()`` raises ``MultipleObjectsReturned`` if more than one object was
+found. The ``MultipleObjectsReturned`` exception is an attribute of the model
+class.
-``get()`` raises a ``DoesNotExist`` exception if an object wasn't found for the
-given parameters. The ``DoesNotExist`` exception is an attribute of the model
-class. Example::
+``get()`` raises a ``DoesNotExist`` exception if an object wasn't found for
+the given parameters. This exception is also an attribute of the model class.
+Example::
Entry.objects.get(id='foo') # raises Entry.DoesNotExist
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---