To retrieve objects from your database, construct a
QuerySet via a
Manager on your model class.
QuerySet represents a collection of objects from your database. It can have zero, one or many filters. Filters narrow down the query results based on the given parameters. In SQL terms, a
QuerySet equates to a
SELECT statement, and a filter is a limiting clause such as
You get a
QuerySet by using your model's
Manager. Each model has at least one
Manager, and it's called
objects by default. Access it directly via the model class, like so:
>>> Blog.objects <django.db.models.manager.Manager object at ...> >>> b = Blog(name='Foo', tagline='Bar') >>> b.objects Traceback: ... AttributeError: "Manager isn't accessible via ...