apis_core.apis_metainfo package
Subpackages
- apis_core.apis_metainfo.migrations package
- Submodules
- apis_core.apis_metainfo.migrations.0001_initial module
- apis_core.apis_metainfo.migrations.0002_auto_20220201_1241 module
- apis_core.apis_metainfo.migrations.0003_auto_20220218_1530 module
- apis_core.apis_metainfo.migrations.0004_auto_20230310_0804 module
- apis_core.apis_metainfo.migrations.0005_delete_uricandidate module
- apis_core.apis_metainfo.migrations.0006_delete_text module
- apis_core.apis_metainfo.migrations.0007_delete_source module
- apis_core.apis_metainfo.migrations.0008_alter_rootobject_self_contenttype module
- apis_core.apis_metainfo.migrations.0009_remove_collection_collection_type module
- apis_core.apis_metainfo.migrations.0010_rename_name_rootobject_deprecated_name module
- apis_core.apis_metainfo.migrations.0011_alter_rootobject_deprecated_name module
- apis_core.apis_metainfo.migrations.0012_remove_rootobject_deprecated_name module
- apis_core.apis_metainfo.migrations.0013_delete_collection module
- apis_core.apis_metainfo.migrations.0014_remove_uri_domain_remove_uri_loaded_and_more module
Submodules
apis_core.apis_metainfo.admin module
apis_core.apis_metainfo.apps module
apis_core.apis_metainfo.filtersets module
- class apis_core.apis_metainfo.filtersets.UriFilterSet(data=None, queryset=None, *, request=None, prefix=None)[source]
Bases:
GenericFilterSet
- base_filters = {'uri': <django_filters.filters.CharFilter object>}
- declared_filters = {'uri': <django_filters.filters.CharFilter object>}
apis_core.apis_metainfo.forms module
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
- class apis_core.apis_metainfo.models.InheritanceForwardManyToOneDescriptor(field_with_rel)[source]
Bases:
ForwardManyToOneDescriptor
- 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
- 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 aReverseOneToOneDescriptor
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 aReverseOneToOneDescriptor
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 aReverseOneToOneDescriptor
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 aForwardManyToOneDescriptor
instance.
- self_contenttype_id
- 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 aReverseManyToOneDescriptor
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.
- 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.
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.
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
- 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>}
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
- name = None
- suffix = None