categories.models.CategoryRelationManager

CategoryRelationManager#

class categories.models.CategoryRelationManager(*args, **kwargs)[source]#

Custom access functions for category relations.

Methods

aggregate(*args, **kwargs)

Return a dictionary containing the calculations (aggregation) over the current queryset.

alias(*args, **kwargs)

Return a query set with added aliases for extra data or aggregations.

all()

annotate(*args, **kwargs)

Return a query set in which the returned objects have been annotated with extra data or aggregations.

bulk_create(*args, **kwargs)

Insert each of the instances into the database.

bulk_update(*args, **kwargs)

Update the given fields in each of the given objects in the database.

check(**kwargs)

complex_filter(*args, **kwargs)

Return a new QuerySet instance with filter_obj added to the filters.

contribute_to_class(cls, name)

count(*args, **kwargs)

Perform a SELECT COUNT() and return the number of records as an integer.

create(*args, **kwargs)

Create a new object with the given kwargs, saving it to the database and returning the created object.

dates(*args, **kwargs)

Return a list of date objects representing all available dates for the given field_name, scoped to 'kind'.

datetimes(*args, **kwargs)

Return a list of datetime objects representing all available datetimes for the given field_name, scoped to 'kind'.

db_manager([using, hints])

deconstruct()

Return a 5-tuple of the form (as_manager (True), manager_class, queryset_class, args, kwargs).

defer(*args, **kwargs)

Defer the loading of data for certain fields until they are accessed.

difference(*args, **kwargs)

distinct(*args, **kwargs)

Return a new QuerySet instance that will select only distinct results.

earliest(*args, **kwargs)

exclude(*args, **kwargs)

Return a new QuerySet instance with NOT (args) ANDed to the existing set.

exists(*args, **kwargs)

explain(*args, **kwargs)

extra(*args, **kwargs)

Add extra SQL fragments to the query.

filter(*args, **kwargs)

Return a new QuerySet instance with the args ANDed to the existing set.

first(*args, **kwargs)

Return the first object of a query or None if no match is found.

from_queryset(queryset_class[, class_name])

get(*args, **kwargs)

Perform the query and return a single object matching the given keyword arguments.

get_content_type(content_type)

Get all the items of the given content type related to this item.

get_or_create(*args, **kwargs)

Look up an object with the given kwargs, creating one if necessary.

get_queryset()

Return a new QuerySet object.

get_relation_type(relation_type)

Get all the items of the given relationship type related to this item.

in_bulk(*args, **kwargs)

Return a dictionary mapping each of the given IDs to the object with that ID.

intersection(*args, **kwargs)

iterator(*args, **kwargs)

An iterator over the results from applying this QuerySet to the database.

last(*args, **kwargs)

Return the last object of a query or None if no match is found.

latest(*args, **kwargs)

none(*args, **kwargs)

Return an empty QuerySet.

only(*args, **kwargs)

Essentially, the opposite of defer().

order_by(*args, **kwargs)

Return a new QuerySet instance with the ordering changed.

prefetch_related(*args, **kwargs)

Return a new QuerySet instance that will prefetch the specified Many-To-One and Many-To-Many related objects when the QuerySet is evaluated.

raw(*args, **kwargs)

reverse(*args, **kwargs)

Reverse the ordering of the QuerySet.

select_for_update(*args, **kwargs)

Return a new QuerySet instance that will select objects with a FOR UPDATE lock.

select_related(*args, **kwargs)

Return a new QuerySet instance that will select related objects.

union(*args, **kwargs)

update(*args, **kwargs)

Update all elements in the current QuerySet, setting all the given fields to the appropriate values.

update_or_create(*args, **kwargs)

Look up an object with the given kwargs, updating one with defaults if it exists, otherwise create a new one.

using(*args, **kwargs)

Select which database this QuerySet should execute against.

values(*args, **kwargs)

values_list(*args, **kwargs)

Attributes

auto_created

creation_counter

db

use_in_migrations

If set to True the manager will be serialized into migrations and will