summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-10-24 07:20:29 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-10-24 07:20:29 +0000
commit8cf2a05d35a3f2a296393b8eb83f7db272bf3ad8 (patch)
treea11c6d963cd36a79867bdb6f410ac64785549632 /docs
parent568cb5d87ccdc89dc4889a9717854c680c67ed87 (diff)
[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. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9261 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/querysets.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 72a98cb547..a2b94ebd82 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -743,11 +743,13 @@ they query the database each time they're called.
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