Changeset 7559
- Timestamp:
- 05/29/08 06:56:32 (6 months ago)
- Files:
-
- django/trunk/docs/db-api.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/db-api.txt
r7499 r7559 1062 1062 the format described in `Field lookups`_. 1063 1063 1064 ``get()`` raises ``AssertionError`` if more than one object was found. 1064 ``get()`` raises ``MultipleObjectsReturned`` if more than one object was found. 1065 The ``MultipleObjectsReturned`` exception is an attribute of the model class. 1066 For example, the following will raise ``MultipleObjectsReturned`` if there 1067 are more than one authors with the name of 'John':: 1068 1069 Author.objects.get(name='John') # raises Author.MultipleObjectsReturned 1065 1070 1066 1071 ``get()`` raises a ``DoesNotExist`` exception if an object wasn't found for the
