syncano.models.classes¶
- class Class(**kwargs)[source]¶
Bases: syncano.models.archetypes.Model
OO wrapper around instance classes link.
Variables: - name – StringField
- description – StringField
- objects_count – Field
- schema – SchemaField
- links – HyperlinkedField
- status – Field
- metadata – JSONField
- revision – IntegerField
- expected_revision – IntegerField
- updated_at – DateTimeField
- created_at – DateTimeField
- group – IntegerField
- group_permissions – ChoiceField
- other_permissions – ChoiceField
- objects – RelatedManagerField
Note
This model is special because each related Object will be dynamically populated with fields defined in schema attribute.
- PERMISSIONS_CHOICES = ({'display_name': 'None', 'value': 'none'}, {'display_name': 'Read', 'value': 'read'}, {'display_name': 'Create objects', 'value': 'create_objects'})¶
- name = None¶
- description = None¶
- objects_count = None¶
- schema = None¶
- links = None¶
- status = None¶
- metadata = None¶
- revision = None¶
- expected_revision = None¶
- updated_at = None¶
- created_at = None¶
- group = None¶
- group_permissions = None¶
- other_permissions = None¶
- objects¶
- DoesNotExist¶
alias of ClassDoesNotExist
- instance_name = None¶
- pk = None¶
- please¶
- class Object(**kwargs)[source]¶
Bases: syncano.models.archetypes.Model
OO wrapper around data objects link.
Variables: - revision – IntegerField
- created_at – DateTimeField
- updated_at – DateTimeField
- owner – IntegerField
- owner_permissions – ChoiceField
- group – IntegerField
- group_permissions – ChoiceField
- other_permissions – ChoiceField
- channel – StringField
- channel_room – StringField
Note
This model is special because each instance will be dynamically populated with fields defined in related Class schema attribute.
- PERMISSIONS_CHOICES = ({'display_name': 'None', 'value': 'none'}, {'display_name': 'Read', 'value': 'read'}, {'display_name': 'Write', 'value': 'write'}, {'display_name': 'Full', 'value': 'full'})¶
- revision = None¶
- created_at = None¶
- updated_at = None¶
- owner = None¶
- owner_permissions = None¶
- group = None¶
- group_permissions = None¶
- other_permissions = None¶
- channel = None¶
- channel_room = None¶
- please¶
- classmethod get_subclass_model(instance_name, class_name, **kwargs)[source]¶
Creates custom Object sub-class definition based on passed instance_name and class_name.
- DoesNotExist¶
alias of ObjectDoesNotExist
- class_name = None¶
- id = None¶
- instance_name = None¶
- pk = None¶