djai.data.models.base module¶
DjAI base DataSchema & DataSet classes.
- class djai.data.models.base.DataSchema(*args, **kwargs)[source]¶
Bases:
polymorphic.models.PolymorphicModel,djai.util.models._ModelWithUUIDPKAndOptionalUniqueNameAndTimestampsABCDjAI DataSchema class.
- exception DoesNotExist¶
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
django.core.exceptions.MultipleObjectsReturned
- created¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- data_sets¶
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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
- get_next_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
- get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
- get_previous_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
- modified¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name: CharField¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- polymorphic_ctype¶
The model field that stores the
ContentTypereference to the actual class.
- polymorphic_ctype_id¶
- polymorphic_primary_key_name = 'uuid'¶
- polymorphic_super_sub_accessors_replaced = False¶
- specs¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- uuid: UUIDField¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class djai.data.models.base.DataSet(*args, **kwargs)[source]¶
Bases:
polymorphic.models.PolymorphicModel,djai.util.models._ModelWithUUIDPKAndOptionalUniqueNameAndTimestampsABCDjAI base DataSet class.
- exception DoesNotExist¶
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
django.core.exceptions.MultipleObjectsReturned
- RELATED_NAME: str = 'data_sets'¶
- RELATED_QUERY_NAME: str = 'data_set'¶
- created¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
- get_next_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
- get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
- get_previous_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
- in_db_json_data_sets¶
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.restaurantis aReverseOneToOneDescriptorinstance.
- modified¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name: CharField¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- polymorphic_ctype¶
The model field that stores the
ContentTypereference to the actual class.
- polymorphic_ctype_id¶
- polymorphic_primary_key_name = 'uuid'¶
- polymorphic_super_sub_accessors_replaced = False¶
- schema: django.db.models.fields.related.ForeignKey¶
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.parentis aForwardManyToOneDescriptorinstance.
- schema_id¶
- uuid: UUIDField¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.