Model class reference
exception Model.``DoesNotExist
This exception is raised by the ORM when an expected object is not found. For example, QuerySet.get()
will raise it when no object is found for the given lookups.
exception Model.``MultipleObjectsReturned
This exception is raised by when multiple objects are found for the given lookups.
Model.``objects
Each non-abstract Model
class must have a instance added to it. Django ensures that in your model class you have at least a default Manager
specified. If you don’t add your own Manager
, Django will add an attribute objects
containing default instance. If you add your own instance attribute, the default one does not appear. Consider the following example: