apis_core.uris.models#

Module Contents#

Classes#

UriQuerySet

UriManager

Uri

The URI model provides a way of storing globally scoped identifiers for objects. For the objects in our application, we store both internal URIs (URIs that we created) as well as external URIs (when we want to link the object to an external resource, asserting that this object is the “same as” the external object).

API#

class apis_core.uris.models.UriQuerySet(model=None, query=None, using=None, hints=None)#

Bases: django.db.models.query.QuerySet

get(*args, **kwargs)#
class apis_core.uris.models.UriManager#

Bases: django.db.models.Manager

get_queryset()#
get_for_instance(instance)#
class apis_core.uris.models.Uri(*args, **kwargs)#

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

The URI model provides a way of storing globally scoped identifiers for objects. For the objects in our application, we store both internal URIs (URIs that we created) as well as external URIs (when we want to link the object to an external resource, asserting that this object is the “same as” the external object).

Initialization

uri = 'URLField(...)'#
content_type = 'ForeignKey(...)'#
object_id = 'PositiveIntegerField(...)'#
content_object = 'GenericForeignKey(...)'#
objects = 'UriManager(...)'#
__str__()#
save(*args, **kwargs)#
clean()#
internal() → bool#
short_label() → str#