apis_core.relations.models#

Module Contents#

Classes#

Functions#

Data#

API#

apis_core.relations.models.logger = 'getLogger(...)'#
class apis_core.relations.models.RelationManager#

Bases: model_utils.managers.InheritanceManager

create_between_instances(subj, obj, *args, **kwargs)#
to_content_type_with_targets(content_type)#

Return the queryset annotated with the target content type and object id, based on the content_type that is passed.

class apis_core.relations.models.RelationModelBase#

Bases: django.db.models.base.ModelBase

__new__(name, bases, attrs)#
apis_core.relations.models.get_by_natural_key(natural_key: str)#
class apis_core.relations.models.Relation(*args, **kwargs)#

Bases: apis_core.generic.abc.GenericModel, django.db.models.Model

class Config#

Bases: apis_core.generic.abc.GenericModel.Config

overview_section = '_(...)'#
search_initial = True#
subj_content_type = 'ForeignKey(...)'#
subj_object_id = 'PositiveIntegerField(...)'#
subj = 'GenericForeignKey(...)'#
obj_content_type = 'ForeignKey(...)'#
obj_object_id = 'PositiveIntegerField(...)'#
obj = 'GenericForeignKey(...)'#
objects = 'RelationManager(...)'#
class Meta#
indexes = None#
save(*args, **kwargs)#
property subj_to_obj_text: str#
property obj_to_subj_text: str#
__str__()#
classmethod subj_model_type()#
classmethod obj_model_type()#
classmethod name() → str#
classmethod reverse_name() → str#
classmethod name_and_reverse_name() → str#

Return a string with both the name and the reverse name.

If they are identical, return only the name.

get_update_success_url(request: Optional[django.http.request.HttpRequest] = None)#