Note
This is a public alpha release, and therefore features and functionality may change and the software and documentation may contain technical bugs or other issues. If you discover any issues please consider registering a GitHub issue.
datasources.models.metadata module¶
This module contains models for dynamic assignment of metadata to data sources.
-
class
datasources.models.metadata.
MetadataField
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
A metadata field that can be dynamically added to a data source.
Operational MetadataFields are those which have some associated code within PEDASI. They should be present within any deployment of PEDASI.
Current operational metadata fields are (by short_name): - data_query_param - indexed_field
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
classmethod
load_inline_fixtures
()[source]¶ Create any instances required for the functioning of PEDASI.
This is called from within the AppConfig.
-
name
¶ Name of the field
-
objects
= <django.db.models.manager.Manager object>¶
-
operational
¶ Does the field have an operational effect within PEDASI?
-
short_name
¶ Short text identifier for the field
-
values
¶ 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.
-
exception
-
class
datasources.models.metadata.
MetadataItem
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
The value of the metadata field on a given data source.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
datasource
¶ To which data source does this relate?
-
datasource_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
field
¶ To which field does this relate?
-
field_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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>¶
-
value
¶ The value of this metadata field
-
exception