class QuerySet(model=None, query=None, using=None) [source]
Usually when you’ll interact with a QuerySet you’ll use it by chaining filters. To make this work, most QuerySet methods return new querysets. These methods are covered in detail later in this section.
The QuerySet class has two public attributes you can use for introspection:
-
ordered -
Trueif theQuerySetis ordered — i.e. has anorder_by()clause or a default ordering on the model.Falseotherwise.
-
db -
The database that will be used if this query is executed now.
Note
The query parameter to QuerySet exists so that specialized query subclasses such as GeoQuerySet can reconstruct internal query state. The value of the parameter is an opaque representation of that query state and is not part of a public API. To put it simply: if you need to ask, you don’t need to use it.
Please login to continue.