|
|
__init__(self,
model=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
__getitem__(self,
k)
Retrieve an item or slice from the set of results. |
source code
|
|
|
|
|
|
|
|
|
|
iterator(self)
Performs the SELECT database lookup of this QuerySet. |
source code
|
|
|
|
count(self)
Performs a SELECT COUNT() and returns the number of records as an
integer. |
source code
|
|
|
|
get(self,
*args,
**kwargs)
Performs the SELECT and returns a single object matching the given
keyword arguments. |
source code
|
|
|
|
create(self,
**kwargs)
Create a new object with the given kwargs, saving it to the database
and returning the created object. |
source code
|
|
|
|
|
|
|
latest(self,
field_name=None)
Returns the latest object, according to the model's 'get_latest_by'
option or optional given field_name. |
source code
|
|
|
|
in_bulk(self,
id_list)
Returns a dictionary mapping each of the given IDs to the object with
that ID. |
source code
|
|
|
|
delete(self)
Deletes the records in the current QuerySet. |
source code
|
|
|
|
|
|
|
dates(self,
field_name,
kind,
order='ASC')
Returns a list of datetime objects representing all available dates
for the given field_name, scoped to 'kind'. |
source code
|
|
|
|
filter(self,
*args,
**kwargs)
Returns a new QuerySet instance with the args ANDed to the existing
set. |
source code
|
|
|
|
exclude(self,
*args,
**kwargs)
Returns a new QuerySet instance with NOT (args) ANDed to the existing
set. |
source code
|
|
|
|
| _filter_or_exclude(self,
mapper,
*args,
**kwargs) |
source code
|
|
|
|
|
|
|
select_related(self,
true_or_false=True,
depth=0)
Returns a new QuerySet instance with '_select_related' modified. |
source code
|
|
|
|
order_by(self,
*field_names)
Returns a new QuerySet instance with the ordering changed. |
source code
|
|
|
|
distinct(self,
true_or_false=True)
Returns a new QuerySet instance with '_distinct' modified. |
source code
|
|
|
|
| extra(self,
select=None,
where=None,
params=None,
tables=None) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__setattr__,
__str__
|