Author: mtredinnick
Date: 2008-10-24 02:20:29 -0500 (Fri, 24 Oct 2008)
New Revision: 9261
Modified:
django/branches/releases/1.0.X/docs/ref/models/querysets.txt
Log:
[1.0.X] Fixed #9420 -- Fixed an exception type in the documentation of
Queryset.get(). Based on a suggestion from daveyjoe.
Backport of r9257 from trunk.
Modified: django/branches/releases/1.0.X/docs/ref/models/querysets.txt
===================================================================
--- django/branches/releases/1.0.X/docs/ref/models/querysets.txt
2008-10-24 07:19:45 UTC (rev 9260)
+++ django/branches/releases/1.0.X/docs/ref/models/querysets.txt
2008-10-24 07:20:29 UTC (rev 9261)
@@ -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
-~----------~----~----~----~------~----~------~--~---