anvil_consortium_manager.models module
- class anvil_consortium_manager.models.Account(*args, **kwargs)
Bases:
django_extensions.db.models.TimeStampedModel,django_extensions.db.models.ActivatorModelA model to store information about AnVIL accounts.
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- ERROR_MISMATCHED_EMAIL = 'Account.email and verified_email_entry.email do not match.'
- ERROR_MISMATCHED_USER = 'Account.user and verified_email_entry.user do not match.'
- ERROR_UNVERIFIED_VERIFIED_EMAIL_ENTRY = 'verified_email_entry must have date_verified.'
- ERROR_USER_WITHOUT_VERIFIED_EMAIL_ENTRY = 'Accounts with a user must have a verified_email_entry.'
- ERROR_VERIFIED_EMAIL_ENTRY_WITHOUT_USER = 'Accounts with a verified_email_entry must have a user.'
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- classmethod anvil_audit()
Verify data in the app against AnVIL.
Only billing projects with have_app_as_user=True are checked, because the AnVIL API does not differentiate between billing projects that don’t exist and billing projects where the app is not a user.
- Returns
An instance of
AccountAuditResults
- anvil_exists()
Check if this account exists on AnVIL.
- Returns
Boolean indicator of whether
emailis associated with an account on AnVIL.
- anvil_remove_from_groups()
Remove this account from all groups on AnVIL.
- clean()
Additional custom cleaning steps.
user and verified_email_entry: both or neither must be set.
verified_email_entry must have a non-null date_verified value.
user and verified_email_entry.user must match.
email and verified_email_entry.email must match.
- deactivate()
Set status to deactivated and remove from any AnVIL groups.
- email
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_absolute_url()
Get the absolute url for this object.
- Returns
A string with the url to the detail page for this object.
- get_accessible_workspaces()
Get a list of workspaces an Account has access to.
To be considered accessible, two criteria must be met: 1. The workspace is shared the Account via a group (or parent group). 2. The Account must be part of all groups used as the authorization domain for the workspace, either directly or indirectly.
- Returns
A list of workspaces that are accessible to the account.
- get_all_groups()
get a list of all groups that an Account is in, directly and indirectly
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- get_status_display(*, field=<django.db.models.fields.IntegerField: status>)
- groupaccountmembership_set
Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
Django simple history record for this model.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_service_account
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- note
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- reactivate()
Set status to reactivated and add to any AnVIL groups.
- save(*args, **kwargs)
Save method to set the email address to lowercase before saving.
- save_without_historical_record(*args, **kwargs)
Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
- user
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.placeis aForwardOneToOneDescriptorinstance.
- user_id
- uuid
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- verified_email_entry
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.placeis aForwardOneToOneDescriptorinstance.
- verified_email_entry_id
- class anvil_consortium_manager.models.AnVILProjectManagerAccess(*args, **kwargs)
Bases:
django.db.models.base.ModelA meta model used to define app level permissions
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- EDIT_PERMISSION_CODENAME = 'anvil_project_manager_edit'
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- VIEW_PERMISSION_CODENAME = 'anvil_project_manager_view'
- 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>
- class anvil_consortium_manager.models.BaseWorkspaceData(*args, **kwargs)
Bases:
django.db.models.base.ModelAbstract base class to subclass when creating a custom WorkspaceData model.
- get_absolute_url()
- save_without_historical_record(*args, **kwargs)
Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
- workspace
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.placeis aForwardOneToOneDescriptorinstance.
- workspace_id
- class anvil_consortium_manager.models.BillingProject(*args, **kwargs)
Bases:
django_extensions.db.models.TimeStampedModelA model to store information about AnVIL billing projects.
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- classmethod anvil_audit()
Verify data in the app against AnVIL.
Only billing projects with
have_app_as_user=Trueare checked, because the AnVIL API does not differentiate between billing projects that don’t exist and billing projects where the app is not a user.- Returns
An instance of
BillingProjectAuditResults.
- anvil_exists()
- classmethod anvil_import(billing_project_name, **kwargs)
BiillingProject class method to import an existing billing project from AnVIL.
- get_absolute_url()
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- has_app_as_user
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- note
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>
- save_without_historical_record(*args, **kwargs)
Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
- workspace_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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- class anvil_consortium_manager.models.DefaultWorkspaceData(*args, **kwargs)
Bases:
anvil_consortium_manager.models.BaseWorkspaceDataDefault empty WorkspaceData model.
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
- 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>
- workspace
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.placeis aForwardOneToOneDescriptorinstance.
- class anvil_consortium_manager.models.GroupAccountMembership(*args, **kwargs)
Bases:
django_extensions.db.models.TimeStampedModelA model to store which accounts are in a group.
- ADMIN = 'ADMIN'
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- MEMBER = 'MEMBER'
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- ROLE_CHOICES = [('MEMBER', 'Member'), ('ADMIN', 'Admin')]
- account
Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.
- account_id
- anvil_create()
Add the account to the group on AnVIL.
- anvil_delete()
Remove the account from the group on AnVIL
- get_absolute_url()
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- get_role_display(*, field=<django.db.models.fields.CharField: role>)
- group
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.
- group_id
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
- 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>
- role
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- save_without_historical_record(*args, **kwargs)
Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
- class anvil_consortium_manager.models.GroupGroupMembership(*args, **kwargs)
Bases:
django_extensions.db.models.TimeStampedModelA model to store which groups are in a group.
- ADMIN = 'ADMIN'
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- MEMBER = 'MEMBER'
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- ROLE_CHOICES = [('MEMBER', 'Member'), ('ADMIN', 'Admin')]
- anvil_create()
Add the child group to the parent group on AnVIL.
- anvil_delete()
Remove the child group from the parent on AnVIL
- child_group
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.
- child_group_id
- clean()
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_absolute_url()
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- get_role_display(*, field=<django.db.models.fields.CharField: role>)
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
- 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>
- parent_group
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.
- parent_group_id
- role
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- save_without_historical_record(*args, **kwargs)
Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
- class anvil_consortium_manager.models.HistoricalAccount(id, created, modified, status, activate_date, deactivate_date, email, uuid, is_service_account, note, user, verified_email_entry, history_id, history_date, history_change_reason, history_type, history_user)
Bases:
simple_history.models.HistoricalChanges,django.db.models.base.Model- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- activate_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- deactivate_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- email
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- static get_default_history_user(instance)
Returns the user specified by get_user method for manually creating historical objects
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- get_status_display(*, field=<django.db.models.fields.IntegerField: status>)
- history_change_reason
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_object
- history_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user
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.
- history_user_id
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance
- instance_type
- is_service_account
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modified
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property next_record
Get the next history record for the instance. None if last.
- note
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>
- property prev_record
Get the previous history record for the instance. None if first.
- revert_url()
URL for this change in the default admin site.
- status
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- user
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.
- user_id
- uuid
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- verified_email_entry
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.
- verified_email_entry_id
- class anvil_consortium_manager.models.HistoricalBillingProject(id, created, modified, name, has_app_as_user, note, history_id, history_date, history_change_reason, history_type, history_user)
Bases:
simple_history.models.HistoricalChanges,django.db.models.base.Model- 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.
- static get_default_history_user(instance)
Returns the user specified by get_user method for manually creating historical objects
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- has_app_as_user
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_change_reason
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_object
- history_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user
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.
- history_user_id
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance
- instance_type
- modified
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property next_record
Get the next history record for the instance. None if last.
- note
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>
- property prev_record
Get the previous history record for the instance. None if first.
- revert_url()
URL for this change in the default admin site.
- class anvil_consortium_manager.models.HistoricalDefaultWorkspaceData(id, workspace, history_id, history_date, history_change_reason, history_type, history_user)
Bases:
simple_history.models.HistoricalChanges,django.db.models.base.Model- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- static get_default_history_user(instance)
Returns the user specified by get_user method for manually creating historical objects
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
- history_change_reason
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_object
- history_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user
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.
- history_user_id
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance
- instance_type
alias of
anvil_consortium_manager.models.DefaultWorkspaceData
- property next_record
Get the next history record for the instance. None if last.
- objects = <django.db.models.manager.Manager object>
- property prev_record
Get the previous history record for the instance. None if first.
- revert_url()
URL for this change in the default admin site.
- workspace
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.
- workspace_id
- class anvil_consortium_manager.models.HistoricalGroupAccountMembership(id, created, modified, role, account, group, history_id, history_date, history_change_reason, history_type, history_user)
Bases:
simple_history.models.HistoricalChanges,django.db.models.base.Model- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- account
Overrides get_queryset to provide historic query support, should the instance be historic (and therefore was generated by a timepoint query) and the other side of the relation also uses a history manager.
- account_id
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- static get_default_history_user(instance)
Returns the user specified by get_user method for manually creating historical objects
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- get_role_display(*, field=<django.db.models.fields.CharField: role>)
- group
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.
- group_id
- history_change_reason
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_object
- history_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user
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.
- history_user_id
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance
- instance_type
alias of
anvil_consortium_manager.models.GroupAccountMembership
- modified
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property next_record
Get the next history record for the instance. None if last.
- objects = <django.db.models.manager.Manager object>
- property prev_record
Get the previous history record for the instance. None if first.
- revert_url()
URL for this change in the default admin site.
- role
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class anvil_consortium_manager.models.HistoricalGroupGroupMembership(id, created, modified, role, parent_group, child_group, history_id, history_date, history_change_reason, history_type, history_user)
Bases:
simple_history.models.HistoricalChanges,django.db.models.base.Model- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- child_group
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.
- child_group_id
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- static get_default_history_user(instance)
Returns the user specified by get_user method for manually creating historical objects
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- get_role_display(*, field=<django.db.models.fields.CharField: role>)
- history_change_reason
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_object
- history_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user
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.
- history_user_id
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance
- instance_type
alias of
anvil_consortium_manager.models.GroupGroupMembership
- modified
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property next_record
Get the next history record for the instance. None if last.
- objects = <django.db.models.manager.Manager object>
- parent_group
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.
- parent_group_id
- property prev_record
Get the previous history record for the instance. None if first.
- revert_url()
URL for this change in the default admin site.
- role
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class anvil_consortium_manager.models.HistoricalManagedGroup(id, created, modified, name, is_managed_by_app, note, history_id, history_date, history_change_reason, history_type, history_user)
Bases:
simple_history.models.HistoricalChanges,django.db.models.base.Model- 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.
- static get_default_history_user(instance)
Returns the user specified by get_user method for manually creating historical objects
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- history_change_reason
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_object
- history_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user
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.
- history_user_id
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance
- instance_type
- is_managed_by_app
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modified
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property next_record
Get the next history record for the instance. None if last.
- note
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>
- property prev_record
Get the previous history record for the instance. None if first.
- revert_url()
URL for this change in the default admin site.
- class anvil_consortium_manager.models.HistoricalUserEmailEntry(id, created, modified, uuid, email, date_verification_email_sent, date_verified, user, history_id, history_date, history_change_reason, history_type, history_user)
Bases:
simple_history.models.HistoricalChanges,django.db.models.base.Model- 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.
- date_verification_email_sent
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- date_verified
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- email
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- static get_default_history_user(instance)
Returns the user specified by get_user method for manually creating historical objects
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_date_verification_email_sent(*, field=<django.db.models.fields.DateTimeField: date_verification_email_sent>, is_next=True, **kwargs)
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_date_verification_email_sent(*, field=<django.db.models.fields.DateTimeField: date_verification_email_sent>, is_next=False, **kwargs)
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- history_change_reason
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_object
- history_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user
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.
- history_user_id
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance
- instance_type
- modified
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property next_record
Get the next history record for the instance. None if last.
- objects = <django.db.models.manager.Manager object>
- property prev_record
Get the previous history record for the instance. None if first.
- revert_url()
URL for this change in the default admin site.
- user
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.
- user_id
- uuid
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class anvil_consortium_manager.models.HistoricalWorkspace(id, created, modified, name, note, workspace_type, billing_project, history_id, history_date, history_change_reason, history_type, history_user)
Bases:
simple_history.models.HistoricalChanges,django.db.models.base.Model- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- billing_project
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.
- billing_project_id
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- static get_default_history_user(instance)
Returns the user specified by get_user method for manually creating historical objects
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- history_change_reason
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_object
- history_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user
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.
- history_user_id
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance
- instance_type
- modified
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property next_record
Get the next history record for the instance. None if last.
- note
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>
- property prev_record
Get the previous history record for the instance. None if first.
- revert_url()
URL for this change in the default admin site.
- workspace_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class anvil_consortium_manager.models.HistoricalWorkspaceAuthorizationDomain(id, created, modified, group, workspace, history_id, history_date, history_change_reason, history_type, history_user)
Bases:
simple_history.models.HistoricalChanges,django.db.models.base.Model- 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.
- static get_default_history_user(instance)
Returns the user specified by get_user method for manually creating historical objects
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- group
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.
- group_id
- history_change_reason
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_object
- history_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user
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.
- history_user_id
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance
- instance_type
alias of
anvil_consortium_manager.models.WorkspaceAuthorizationDomain
- modified
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property next_record
Get the next history record for the instance. None if last.
- objects = <django.db.models.manager.Manager object>
- property prev_record
Get the previous history record for the instance. None if first.
- revert_url()
URL for this change in the default admin site.
- workspace
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.
- workspace_id
- class anvil_consortium_manager.models.HistoricalWorkspaceGroupSharing(id, created, modified, access, can_compute, group, workspace, history_id, history_date, history_change_reason, history_type, history_user)
Bases:
simple_history.models.HistoricalChanges,django.db.models.base.Model- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- access
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- can_compute
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_access_display(*, field=<django.db.models.fields.CharField: access>)
- static get_default_history_user(instance)
Returns the user specified by get_user method for manually creating historical objects
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- group
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.
- group_id
- history_change_reason
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_object
- history_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user
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.
- history_user_id
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance
- instance_type
alias of
anvil_consortium_manager.models.WorkspaceGroupSharing
- modified
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property next_record
Get the next history record for the instance. None if last.
- objects = <django.db.models.manager.Manager object>
- property prev_record
Get the previous history record for the instance. None if first.
- revert_url()
URL for this change in the default admin site.
- workspace
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.
- workspace_id
- class anvil_consortium_manager.models.ManagedGroup(*args, **kwargs)
Bases:
django_extensions.db.models.TimeStampedModelA model to store information about AnVIL Managed Groups.
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- classmethod anvil_audit()
Verify data in the app against AnVIL.
- Returns
An instance of
ManagedGroupAuditResults.
- anvil_audit_membership()
Audit the membership for a single group against AnVIL.
- Returns
An instance of
ManagedGroupMembershipAuditResults.
- anvil_create()
Creates the group on AnVIL.
- anvil_delete()
Deletes the group on AnVIL.
- anvil_exists()
Check if the group exists on AnVIL.
- classmethod anvil_import(group_name, **kwargs)
Import an existing group from AnVIL.
- child_memberships
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_absolute_url()
- get_all_children()
Return a queryset of all direct and indirect children of this group. Includes all childrenparents.
Not optimized.
- get_all_parents()
Return a queryset of all direct and indirect parents of this group. Includes all grandparents.
Not optimized.
- get_anvil_url()
Return the URL of the group on AnVIL.
- get_direct_children()
Return a queryset of the direct children of this group. Does not include grandchildren.
- get_direct_parents()
Return a queryset of the direct parents of this group. Does not include grandparents.
- get_email()
- classmethod get_full_graph()
Return a networkx graph of the group structure for all ManagedGroups in the app.
- Returns
A networkx.DiGraph object representing the group relationships.
- get_graph()
Return a networkx graph of the group structure for this group.
The graph contains parents and children that can be reached from this group.
- Returns
A networkx.DiGraph object representing the group relationships.
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- groupaccountmembership_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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- has_access(workspace)
Check if this group has access to a workspace.
Both criteria need to be met for a group to have access to a workspace: 1. The workspace must be shared with the group (or a group that it is in). 2. The group (or a group that it is in) must be in all auth domains for the workspace.
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_in_authorization_domain(workspace)
Check if this group (or a group that it is part of) is in the auth domain of a workspace.
- is_managed_by_app
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
Check if a workspace is shared with this group (or a group that it is part of).
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- note
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>
- parent_memberships
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.
- save_without_historical_record(*args, **kwargs)
Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
- workspace_set
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- workspaceauthorizationdomain_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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- workspacegroupsharing_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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- class anvil_consortium_manager.models.UserEmailEntry(*args, **kwargs)
Bases:
django_extensions.db.models.TimeStampedModel,django.db.models.base.ModelA model to store emails that users could link to their AnVIL account after verification.
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- anvil_account_exists()
Check if this account exists on AnVIL.
- date_verification_email_sent
Most recent date that a verification email was sent.
- date_verified
The date that the email was verified by the user.
- email
The email entered by the user.
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_date_verification_email_sent(*, field=<django.db.models.fields.DateTimeField: date_verification_email_sent>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_date_verification_email_sent(*, field=<django.db.models.fields.DateTimeField: date_verification_email_sent>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
Django simple history.
- 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>
- save(*args, **kwargs)
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.
- save_without_historical_record(*args, **kwargs)
Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
- send_notification_email()
Send notification email after account is verified if the email setting is set
- send_verification_email(domain)
Send a verification email to the email on record.
- Parameters
domain (str) – The domain of the current site, used to create the link.
- user
The user who created the record.
- user_id
- uuid
UUID for use in urls.
- verified_account
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.
- class anvil_consortium_manager.models.Workspace(*args, **kwargs)
Bases:
django_extensions.db.models.TimeStampedModelA model to store information about AnVIL workspaces.
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- classmethod anvil_audit()
Verify data in the app against AnVIL.
This method checks if any workspaces where the service account is an owner exist in AnVIL.
- Returns
An instance of
WorkspaceAuditResults.
- anvil_audit_sharing()
Audit the sharing for a single Workspace against AnVIL.
- Returns
An instance of
WorkspaceGroupSharingAuditResults.
- anvil_clone(billing_project, workspace_name, authorization_domains=[])
Clone this workspace to create a new workspace on AnVIL.
If the workspace to clone already has authorization domains, they will be added to the authorization domains specified in authorization_domains.
- anvil_create()
Create the workspace on AnVIL.
- anvil_delete()
Delete the workspace on AnVIL.
- anvil_exists()
Check if the workspace exists on AnVIL.
- classmethod anvil_import(billing_project_name, workspace_name, workspace_type, note='')
Create a new instance for a workspace that already exists on AnVIL.
Methods calling this should handle AnVIL API exceptions appropriately.
- authorization_domains
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- billing_project
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.
- billing_project_id
- clean_fields(exclude=None)
Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur.
- defaultworkspacedata
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.
- exampleworkspacedata
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.
- get_absolute_url()
- get_anvil_url()
Return the URL of the workspace on AnVIL.
- get_full_name()
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- has_access(group)
Check if a group has access to a workspace.
Both criteria need to be met for a group to have access to a workspace: 1. The workspace must be shared with the group (or a group that it is in). 2. The group (or a group that it is in) must be in all auth domains for the workspace.
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_in_authorization_domain(group)
Check if a group (or a group that it is part of) is in the auth domain of this workspace.
Check if this workspace is shared with a group (or a group that it is part of).
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- note
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>
- save_without_historical_record(*args, **kwargs)
Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
- workspace_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- workspaceauthorizationdomain_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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- workspacegroupsharing_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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- class anvil_consortium_manager.models.WorkspaceAuthorizationDomain(*args, **kwargs)
Bases:
django_extensions.db.models.TimeStampedModelThrough table for the Workspace authorization_domains field.
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- group
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.
- group_id
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
- 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>
- save_without_historical_record(*args, **kwargs)
Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
- workspace
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.
- workspace_id
- class anvil_consortium_manager.models.WorkspaceGroupSharing(*args, **kwargs)
Bases:
django_extensions.db.models.TimeStampedModelA model to store which workspaces have been shared with which groups.
- ACCESS_CHOICES = [('OWNER', 'Owner'), ('WRITER', 'Writer'), ('READER', 'Reader')]
Allowed choices for the
accessfield.
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- OWNER = 'OWNER'
Constant indicating “OWNER” access.
- READER = 'READER'
Constant indicating “READER” access.
- WRITER = 'WRITER'
Constant indicating “WRITER” access.
- access
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- anvil_create_or_update()
Create or update the access to
workspacefor thegroupon AnVIL.- Raises
exceptions.AnVILGroupNotFound – The group that the workspace is being shared with does not exist on AnVIL.
- anvil_delete()
Remove the access to
workspacefor thegroupon AnVIL.
- can_compute
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- clean()
Perform model cleaning steps.
This method checks that can_compute is not set to
Truefor “READERS”.
- get_absolute_url()
Get the absolute url for this object.
- Returns
The absolute url for the object.
- Return type
str
- get_access_display(*, field=<django.db.models.fields.CharField: access>)
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- group
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.
- group_id
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
Historical records from django-simple-history.
- 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>
- save_without_historical_record(*args, **kwargs)
Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
- workspace
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.
- workspace_id