apis_core.apis_metainfo package

Subpackages

Submodules

apis_core.apis_metainfo.admin module

apis_core.apis_metainfo.apps module

class apis_core.apis_metainfo.apps.MetainfoConfig(app_name, app_module)[source]

Bases: AppConfig

default_auto_field = 'django.db.models.AutoField'
name = 'apis_core.apis_metainfo'
ready()[source]

Override this method in subclasses to run code when Django starts.

apis_core.apis_metainfo.filtersets module

class apis_core.apis_metainfo.filtersets.UriFilterSet(data=None, queryset=None, *, request=None, prefix=None)[source]

Bases: GenericFilterSet

class Meta[source]

Bases: Meta

exclude = ['root_object']
base_filters = {'uri': <django_filters.filters.CharFilter object>}
declared_filters = {'uri': <django_filters.filters.CharFilter object>}

apis_core.apis_metainfo.forms module

class apis_core.apis_metainfo.forms.UriForm(*args, **kwargs)[source]

Bases: GenericModelForm

base_fields = {}
declared_fields = {}
property media

Return all media required to render the widgets on this form.

apis_core.apis_metainfo.models module

class apis_core.apis_metainfo.models.InheritanceForeignKey(to, on_delete, related_name=None, related_query_name=None, limit_choices_to=None, parent_link=False, to_field=None, db_constraint=True, **kwargs)[source]

Bases: ForeignKey

alias of InheritanceForwardManyToOneDescriptor

class apis_core.apis_metainfo.models.InheritanceForwardManyToOneDescriptor(field_with_rel)[source]

Bases: ForwardManyToOneDescriptor

get_queryset(**hints)[source]
class apis_core.apis_metainfo.models.RootObject(*args, **kwargs)[source]

Bases: GenericModel, Model

The very root thing that can exist in a given ontology. Several classes inherit from it. By having one overarching super class we gain the advantage of unique identifiers.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

duplicate()[source]
group

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
objects_inheritance = <model_utils.managers.InheritanceManager object>
person

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

place

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

property

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

save(*args, **kwargs)[source]

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

self_contenttype

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

self_contenttype_id
triple_set_from_obj

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

triple_set_from_subj

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

uri_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class apis_core.apis_metainfo.models.Uri(id, uri, root_object)[source]

Bases: GenericModel, Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

clean()[source]

Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.

get_web_object()[source]
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <apis_core.apis_metainfo.models.UriManager object>
root_object
root_object_id
save(*args, **kwargs)[source]

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

uri

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class apis_core.apis_metainfo.models.UriManager(*args, **kwargs)[source]

Bases: Manager

get_queryset()[source]

Return a new QuerySet object. Subclasses can override this method to customize the behavior of the Manager.

class apis_core.apis_metainfo.models.UriQuerySet(model=None, query=None, using=None, hints=None)[source]

Bases: QuerySet

get(*args, **kwargs)[source]

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

apis_core.apis_metainfo.serializers module

class apis_core.apis_metainfo.serializers.UriSerializer(*args, **kwargs)[source]

Bases: GenericHyperlinkedModelSerializer

When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.

class Meta[source]

Bases: object

fields = '__all__'
model

alias of Uri

apis_core.apis_metainfo.signals module

apis_core.apis_metainfo.tables module

class apis_core.apis_metainfo.tables.UriTable(data=None, order_by=None, orderable=None, empty_text=None, exclude=None, attrs=None, row_attrs=None, pinned_row_attrs=None, sequence=None, prefix=None, order_by_field=None, page_field=None, per_page_field=None, template_name=None, default=None, request=None, show_header=None, show_footer=True, extra_columns=None)[source]

Bases: GenericTable

class Meta[source]

Bases: Meta

exclude = ('desc',)
fields = ['id', 'uri', 'entity', 'ent_type']
model

alias of Uri

base_columns = {'delete': <apis_core.generic.tables.DeleteColumn object>, 'edit': <apis_core.generic.tables.EditColumn object>, 'ent_type': <django_tables2.columns.templatecolumn.TemplateColumn object>, 'entity': <django_tables2.columns.templatecolumn.TemplateColumn object>, 'id': <django_tables2.columns.base.Column object>, 'uri': <django_tables2.columns.urlcolumn.URLColumn object>, 'view': <apis_core.generic.tables.ViewColumn object>}
order_ent_type(queryset, is_descending)[source]

apis_core.apis_metainfo.urls module

apis_core.apis_metainfo.viewsets module

class apis_core.apis_metainfo.viewsets.UriToObjectViewSet(**kwargs)[source]

Bases: ViewSet

This API route provides an endpoint for resolving URIs and forwarding them to the endpoint in the local instance. Pass a uri request parameter to resolve the uri.

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

basename = None
description = None
detail = None
list(request)[source]
name = None
suffix = None