anvil_consortium_manager.views module
- class anvil_consortium_manager.views.AccountActiveList(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,AccountAdapterMixin,SingleTableMixin,FilterView- get_queryset()
Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
- ordering = ('email',)
- template_name = 'anvil_consortium_manager/account_list.html'
- class anvil_consortium_manager.views.AccountAutocomplete(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,Select2QuerySetViewView to provide autocompletion for Accounts. Only active accounts are included.
- get_queryset()
Filter the queryset with GET[‘q’].
- get_result_label(item)
Return the label of a result.
- get_selected_result_label(item)
Return the label of a selected result.
- class anvil_consortium_manager.views.AccountDeactivate(*args, **kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,SingleTableMixin,SingleAccountMixin,DeleteViewDeactivate an account and remove it from all groups on AnVIL.
- context_table_name = 'group_table'
- form_class
alias of
Form
- form_valid(form)
Make an API call to AnVIL to remove the account from all groups and then set status to inactive.
- get(*args, **kwargs)
- get_success_url()
Return the URL to redirect to after processing a valid form.
- get_table()
Return a table object to use. The table has automatic support for sorting and pagination.
- message_already_inactive = 'This Account is already inactive.'
- message_error_removing_from_groups = 'Error removing account from groups; manually verify group memberships on AnVIL. (AnVIL API Error: {})'
- success_message = 'Successfully deactivated Account in app.'
- template_name = 'anvil_consortium_manager/account_confirm_deactivate.html'
- class anvil_consortium_manager.views.AccountDelete(*args, **kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,SingleAccountMixin,DeleteView- form_valid(form)
Make an API call to AnVIL to remove the account from all groups and then delete it from the app.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- message_error_removing_from_groups = 'Error removing account from groups; manually verify group memberships on AnVIL. (AnVIL API Error: {})'
- success_message = 'Successfully deleted Account from app.'
- class anvil_consortium_manager.views.AccountDetail(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,SingleAccountMixin,DetailViewRender detail page for an
anvil_consortium_manager.models.Account.- get_context_data(**kwargs)
Insert the single object into the context dict.
- class anvil_consortium_manager.views.AccountImport(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,CreateViewImport an account from AnVIL.
This view checks that the specified email has a valid AnVIL account. If so, it saves a record in the database.
- form_class
A string that can be displayed if the account does not exist on AnVIL.
alias of
AccountImportForm
- form_valid(form)
If the form is valid, check that the account exists on AnVIL and save the associated model.
- message_account_does_not_exist = 'This account does not exist on AnVIL.'
A string that can be displayed if the account does not exist on AnVIL.
- message_email_associated_with_group = 'This email is associated with a group, not a user.'
A string that can be displayed if the account does not exist on AnVIL.
- success_message = 'Successfully imported Account from AnVIL.'
A string that can be displayed if the account was imported successfully.
- template_name = 'anvil_consortium_manager/account_import.html'
- class anvil_consortium_manager.views.AccountInactiveList(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,AccountAdapterMixin,SingleTableMixin,FilterView- get_queryset()
Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
- ordering = ('email',)
- template_name = 'anvil_consortium_manager/account_list.html'
- class anvil_consortium_manager.views.AccountLink(**kwargs)
Bases:
AnVILConsortiumManagerAccountLinkRequired,SuccessMessageMixin,FormViewView where a user enter their AnVIL email to get an email verification link.
- form_class
alias of
UserEmailEntryForm
- form_valid(form)
If the form is valid, check that the email exists on AnVIL and send verification email.
- get(request, *args, **kwargs)
Check if the user already has an account linked and redirect.
- get_redirect_url()
- get_success_url()
Return the URL to redirect to after processing a valid form.
- login_url = '/accounts/login/'
- message_account_already_exists = 'An AnVIL Account with this email already exists in this app.'
- message_account_does_not_exist = 'This account does not exist on AnVIL.'
- message_user_already_linked = 'You have already linked an AnVIL account.'
- model
alias of
UserEmailEntry
- post(request, *args, **kwargs)
Check if the user already has an account linked and redirect.
- success_message = 'To complete linking the account, check your email for a verification link.'
- template_name = 'anvil_consortium_manager/account_link.html'
- class anvil_consortium_manager.views.AccountLinkVerify(**kwargs)
Bases:
AnVILConsortiumManagerAccountLinkRequired,RedirectViewView where a user can verify their email and create an Account object.
- get(request, *args, **kwargs)
- get_redirect_url(*args, **kwargs)
Return the URL redirect to. Keyword arguments from the URL pattern match generating the redirect request are provided as kwargs to this method.
- log_message_after_account_link_failed = 'Error in after_account_verification hook'
- log_message_send_account_verification_notification_email_failed = 'Error in send_account_verification_notification_email hook'
- mail_subject_after_account_link_failed = 'AccountLinkVerify - error encountered in after_account_verification'
- mail_subject_send_account_verification_notification_email_failed = 'AccountLinkVerify - error encountered in send_account_verification_notification_email'
- mail_template_after_account_link_failed = 'anvil_consortium_manager/account_link_error_email.html'
- mail_template_send_account_verification_notification_email_failed = 'anvil_consortium_manager/account_link_error_email.html'
- message_account_already_exists = 'An AnVIL Account with this email already exists in this app.'
- message_account_does_not_exist = 'This account does not exist on AnVIL.'
- message_already_linked = 'You have already linked an AnVIL account.'
- message_link_invalid = 'AnVIL account verification link is invalid.'
- message_service_account = 'Account is already marked as a service account.'
- message_success = 'Thank you for linking your AnVIL account.'
- class anvil_consortium_manager.views.AccountList(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,AccountAdapterMixin,SingleTableMixin,FilterViewView to display a list of Accounts.
The table class can be customized using in a custom Account adapter.
- ordering = ('email',)
- template_name = 'anvil_consortium_manager/account_list.html'
- class anvil_consortium_manager.views.AccountReactivate(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,SingleTableMixin,SingleAccountMixin,SingleObjectMixin,FormViewReactivate an account and re-add it to all groups on AnVIL.
- context_table_name = 'group_table'
- form_class
alias of
Form
- form_valid(form)
Set the object status to active and add it to all groups on AnVIL.
- get(*args, **kwargs)
Handle GET requests: instantiate a blank version of the form.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- get_table()
Return a table object to use. The table has automatic support for sorting and pagination.
- message_already_active = 'This Account is already active.'
- message_error_adding_to_groups = 'Error adding account to groups; manually verify group memberships on AnVIL. (AnVIL API Error: {})'
- success_message = 'Successfully reactivated Account in app.'
- template_name = 'anvil_consortium_manager/account_confirm_reactivate.html'
- class anvil_consortium_manager.views.AccountUnlinkUser(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SingleAccountMixin,SuccessMessageMixin,FormViewUnlink an Account from a User.
- form_class
alias of
Form
- form_valid(form)
Unlink the user from the account.
- get(request, *args, **kwargs)
Handle GET requests: instantiate a blank version of the form.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- message_no_user = 'This Account is not linked to a user.'
- post(request, *args, **kwargs)
Handle POST requests: instantiate a form instance with the passed POST variables and then check if it’s valid.
- success_message = 'Successfully unlinked user from Account.'
- template_name = 'anvil_consortium_manager/account_confirm_unlink_user.html'
- class anvil_consortium_manager.views.AccountUpdate(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,SingleAccountMixin,UpdateViewView to update information about an Account.
- form_class
alias of
AccountUpdateForm
- success_message = 'Successfully updated Account.'
- template_name = 'anvil_consortium_manager/account_update.html'
- class anvil_consortium_manager.views.AnVILStatus(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,TemplateView- get_context_data(**kwargs)
- template_name = 'anvil_consortium_manager/status.html'
- class anvil_consortium_manager.views.BillingProjectAutocomplete(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,Select2QuerySetViewView to provide autocompletion for BillingProjects. Only billing project where the app is a user are included.
- get_queryset()
Filter the queryset with GET[‘q’].
- class anvil_consortium_manager.views.BillingProjectDetail(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,SingleTableMixin,DetailView- context_table_name = 'workspace_table'
- get_context_data(**kwargs)
Add show_edit_links to context data.
- get_table()
Return a table object to use. The table has automatic support for sorting and pagination.
- model
alias of
BillingProject
- slug_field = 'name'
- class anvil_consortium_manager.views.BillingProjectImport(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,CreateView- form_class
alias of
BillingProjectImportForm
- form_valid(form)
If the form is valid, check that we can access the BillingProject on AnVIL and save the associated model.
- message_not_users_of_billing_project = "Not a user of requested billing project or it doesn't exist on AnVIL."
- model
alias of
BillingProject
- success_message = 'Successfully imported Billing Project from AnVIL.'
- template_name = 'anvil_consortium_manager/billingproject_import.html'
- class anvil_consortium_manager.views.BillingProjectList(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,SingleTableMixin,FilterView- filterset_class
alias of
BillingProjectListFilter
- model
alias of
BillingProject
- ordering = ('name',)
- table_class
alias of
BillingProjectStaffTable
- template_name = 'anvil_consortium_manager/billingproject_list.html'
- class anvil_consortium_manager.views.BillingProjectUpdate(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,UpdateViewView to update information about a Billing Project.
- form_class
alias of
BillingProjectUpdateForm
- model
alias of
BillingProject
- slug_field = 'name'
- success_message = 'Successfully updated Billing Project.'
- template_name = 'anvil_consortium_manager/billingproject_update.html'
- class anvil_consortium_manager.views.GroupAccountMembershipActiveList(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,SingleTableViewShow a list of all group memberships for active accounts.
- get_queryset()
Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
- model
alias of
GroupAccountMembership
- ordering = ('group__name', 'account__email')
- table_class
alias of
GroupAccountMembershipStaffTable
- class anvil_consortium_manager.views.GroupAccountMembershipCreate(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,CreateView- form_class
alias of
GroupAccountMembershipForm
- form_valid(form)
If the form is valid, save the associated model and create it on AnVIL.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- model
alias of
GroupAccountMembership
- success_message = 'Successfully added account membership.'
- class anvil_consortium_manager.views.GroupAccountMembershipCreateByAccount(**kwargs)
Bases:
GroupAccountMembershipCreateView to create a new GroupAccountMembership for the account specified in the url.
- get(request, *args, **kwargs)
Handle GET requests: instantiate a blank version of the form.
- get_account()
- get_context_data(**kwargs)
Insert the form into the context dict.
- get_form(**kwargs)
Get the form and set the inputs to use a hidden widget.
- get_initial()
Return the initial data to use for forms on this view.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- message_already_exists = 'This Account is already a member of this Managed Group.'
- message_group_not_found = 'Managed Group not found on AnVIL.'
Message to display when the ManagedGroup was not found on AnVIL.
- message_not_managed_by_app = 'Cannot add Account because this group is not managed by the app.'
- post(request, *args, **kwargs)
Handle POST requests: instantiate a form instance with the passed POST variables and then check if it’s valid.
- template_name = 'anvil_consortium_manager/groupaccountmembership_form_byaccount.html'
- class anvil_consortium_manager.views.GroupAccountMembershipCreateByGroup(**kwargs)
Bases:
GroupAccountMembershipCreateView to create a new GroupAccountMembership for the group specified in the url.
- get(request, *args, **kwargs)
Handle GET requests: instantiate a blank version of the form.
- get_context_data(**kwargs)
Insert the form into the context dict.
- get_form(**kwargs)
Get the form and set the inputs to use a hidden widget.
- get_group()
- get_initial()
Return the initial data to use for forms on this view.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- message_already_exists = 'This Account is already a member of this Managed Group.'
- message_group_not_found = 'Managed Group not found on AnVIL.'
Message to display when the ManagedGroup was not found on AnVIL.
- message_not_managed_by_app = 'Cannot add Account because this group is not managed by the app.'
- post(request, *args, **kwargs)
Handle POST requests: instantiate a form instance with the passed POST variables and then check if it’s valid.
- template_name = 'anvil_consortium_manager/groupaccountmembership_form_bygroup.html'
- class anvil_consortium_manager.views.GroupAccountMembershipCreateByGroupAccount(**kwargs)
Bases:
GroupAccountMembershipCreateView to create a new GroupAccountMembership object for the group and account specified in the url.
- get(request, *args, **kwargs)
Handle GET requests: instantiate a blank version of the form.
- get_account()
- get_context_data(**kwargs)
Insert the form into the context dict.
- get_form(**kwargs)
Get the form and set the inputs to use a hidden widget.
- get_group()
- get_initial()
Return the initial data to use for forms on this view.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- message_already_exists = 'This Account is already a member of this Managed Group.'
- message_group_not_found = 'Managed Group not found on AnVIL.'
Message to display when the ManagedGroup was not found on AnVIL.
- post(request, *args, **kwargs)
Handle POST requests: instantiate a form instance with the passed POST variables and then check if it’s valid.
- template_name = 'anvil_consortium_manager/groupaccountmembership_form_bygroupaccount.html'
- class anvil_consortium_manager.views.GroupAccountMembershipDelete(*args, **kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,DeleteView- form_valid(form)
Make an API call to AnVIL and then call the delete method on the object.
- get(request, *args, **kwargs)
- get_object(queryset=None)
Return the object the view is displaying.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- message_group_not_managed_by_app = 'Cannot remove members from group because it is not managed by this app.'
- model
alias of
GroupAccountMembership
- success_message = 'Successfully deleted account membership on AnVIL.'
- class anvil_consortium_manager.views.GroupAccountMembershipDetail(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,DetailView- get_context_data(**kwargs)
Insert the single object into the context dict.
- get_object(queryset=None)
Return the object the view is displaying.
- model
alias of
GroupAccountMembership
- class anvil_consortium_manager.views.GroupAccountMembershipInactiveList(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,SingleTableViewShow a list of all group memberships for inactive accounts.
- get_queryset()
Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
- model
alias of
GroupAccountMembership
- ordering = ('group__name', 'account__email')
- table_class
alias of
GroupAccountMembershipStaffTable
- class anvil_consortium_manager.views.GroupAccountMembershipList(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,SingleTableViewShow a list of all group memberships regardless of account active/inactive status.
- model
alias of
GroupAccountMembership
- table_class
alias of
GroupAccountMembershipStaffTable
- class anvil_consortium_manager.views.GroupGroupMembershipCreate(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,CreateView- form_class
alias of
GroupGroupMembershipForm
- form_valid(form)
If the form is valid, save the associated model and create it on AnVIL.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- model
alias of
GroupGroupMembership
- success_message = 'Successfully created group membership.'
- class anvil_consortium_manager.views.GroupGroupMembershipCreateByChild(**kwargs)
Bases:
GroupGroupMembershipCreateView to create a new GroupGroupMembership object for the child group specified in the url.
- get(request, *args, **kwargs)
Handle GET requests: instantiate a blank version of the form.
- get_child_group()
- get_context_data(**kwargs)
Insert the form into the context dict.
- get_form(**kwargs)
Get the form and set the inputs to use a hidden widget.
- get_initial()
Return the initial data to use for forms on this view.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- post(request, *args, **kwargs)
Handle POST requests: instantiate a form instance with the passed POST variables and then check if it’s valid.
- template_name = 'anvil_consortium_manager/groupgroupmembership_form_bychild.html'
- class anvil_consortium_manager.views.GroupGroupMembershipCreateByParent(**kwargs)
Bases:
GroupGroupMembershipCreateView to create a new GroupGroupMembership object for the parent group specified in the url.
- check_group_errors()
Check parent and child groups and return an error message upon error.
- get(request, *args, **kwargs)
Handle GET requests: instantiate a blank version of the form.
- get_context_data(**kwargs)
Insert the form into the context dict.
- get_form(**kwargs)
Get the form and set the inputs to use a hidden widget.
- get_initial()
Return the initial data to use for forms on this view.
- get_parent_group()
- get_success_url()
Return the URL to redirect to after processing a valid form.
- message_not_managed_by_app = 'Parent group is not managed by this app.'
- post(request, *args, **kwargs)
Handle POST requests: instantiate a form instance with the passed POST variables and then check if it’s valid.
- template_name = 'anvil_consortium_manager/groupgroupmembership_form_byparent.html'
- class anvil_consortium_manager.views.GroupGroupMembershipCreateByParentChild(**kwargs)
Bases:
GroupGroupMembershipCreateView to create a new GroupGroupMembership object for the parent and child groups specified in the url.
- check_group_errors()
Check parent and child groups and return an error message upon error.
- get(request, *args, **kwargs)
Handle GET requests: instantiate a blank version of the form.
- get_child_group()
- get_context_data(**kwargs)
Insert the form into the context dict.
- get_form(**kwargs)
Get the form and set the inputs to use a hidden widget.
- get_initial()
Return the initial data to use for forms on this view.
- get_parent_group()
- get_success_url()
Return the URL to redirect to after processing a valid form.
- message_already_exists = 'Child group is already a member of the parent Managed Group.'
- message_cannot_add_group_to_itself = 'Cannot add a group to itself as a member.'
- message_circular_relationship = 'Cannot add a circular group relationship.'
- message_not_managed_by_app = 'Parent group is not managed by this app.'
- post(request, *args, **kwargs)
Handle POST requests: instantiate a form instance with the passed POST variables and then check if it’s valid.
- template_name = 'anvil_consortium_manager/groupgroupmembership_form_byparentchild.html'
- class anvil_consortium_manager.views.GroupGroupMembershipDelete(*args, **kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,DeleteView- form_valid(form)
Make an API call to AnVIL and then call the delete method on the object.
- get(request, *args, **kwargs)
- get_object(queryset=None)
Return the object the view is displaying.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- message_parent_group_not_managed_by_app = 'Cannot remove members from parent group because it is not managed by this app.'
- model
alias of
GroupGroupMembership
- success_message = 'Successfully deleted group membership on AnVIL.'
- class anvil_consortium_manager.views.GroupGroupMembershipDetail(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,DetailView- get_context_data(**kwargs)
Insert the single object into the context dict.
- get_object(queryset=None)
Return the object the view is displaying.
- model
alias of
GroupGroupMembership
- class anvil_consortium_manager.views.GroupGroupMembershipList(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,SingleTableView- model
alias of
GroupGroupMembership
- table_class
alias of
GroupGroupMembershipStaffTable
- class anvil_consortium_manager.views.Index(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,TemplateView- get_context_data(*args, **kwargs)
Add ACM version to the context data.
- template_name = 'anvil_consortium_manager/index.html'
- class anvil_consortium_manager.views.ManagedGroupAutocomplete(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,Select2QuerySetViewView to provide autocompletion for ManagedGroups.
- get_queryset()
Filter the queryset with GET[‘q’].
- class anvil_consortium_manager.views.ManagedGroupCreate(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,ManagedGroupAdapterMixin,SuccessMessageMixin,FormView- form_class
alias of
ManagedGroupCreateForm
- form_valid(form)
If the form is valid, save the associated model and create it on AnVIL.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- model
alias of
ManagedGroup
- success_message = 'Successfully created Managed Group on AnVIL.'
- template_name = 'anvil_consortium_manager/managedgroup_create.html'
- class anvil_consortium_manager.views.ManagedGroupDelete(*args, **kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,DeleteView- form_valid(form)
Make an API call to AnVIL and then call the delete method on the object.
- get(*args, **kwargs)
- get_success_url()
Return the URL to redirect to after processing a valid form.
- message_could_not_delete_group_from_anvil = 'Cannot not delete group from AnVIL - unknown reason.'
- message_could_not_delete_group_from_app = 'Cannot delete group from app due to foreign key restrictions.'
- message_has_access_to_workspace = 'Cannot delete group because it has access to at least one workspace.'
- message_is_auth_domain = 'Cannot delete group since it is an authorization domain for a workspace.'
- message_is_member_of_another_group = 'Cannot delete group since it is a member of another group.'
- message_not_managed_by_app = 'Cannot delete group because it is not managed by this app.'
- model
alias of
ManagedGroup
- slug_field = 'name'
- success_message = 'Successfully deleted Group on AnVIL.'
- class anvil_consortium_manager.views.ManagedGroupDetail(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,ManagedGroupGraphMixin,DetailView- get_context_data(**kwargs)
Add the graph to the context data.
- get_graph()
Return a graph of the group structure.
- model
alias of
ManagedGroup
- plot_graph()
Create a plotly figure of the graph.
- slug_field = 'name'
- class anvil_consortium_manager.views.ManagedGroupList(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,ManagedGroupAdapterMixin,SingleTableMixin,FilterView- filterset_class
alias of
ManagedGroupListFilter
- get_table_class()
Use the adapter to get the table class.
- model
alias of
ManagedGroup
- ordering = ('name',)
- template_name = 'anvil_consortium_manager/managedgroup_list.html'
- class anvil_consortium_manager.views.ManagedGroupUpdate(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,UpdateViewView to update information about an Account.
- form_class
alias of
ManagedGroupUpdateForm
- model
alias of
ManagedGroup
- slug_field = 'name'
- success_message = 'Successfully updated ManagedGroup.'
- template_name = 'anvil_consortium_manager/managedgroup_update.html'
- class anvil_consortium_manager.views.ManagedGroupVisualization(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,ManagedGroupGraphMixin,TemplateViewDisplay a visualization of all group relationships.
- get_graph()
Return a graph of the group structure.
- template_name = 'anvil_consortium_manager/managedgroup_visualization.html'
- class anvil_consortium_manager.views.WorkspaceAutocomplete(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,Select2QuerySetViewView to provide autocompletion for Workspaces.
Right now this only matches Workspace name, not billing project.
- get_queryset()
Filter the queryset with GET[‘q’].
- class anvil_consortium_manager.views.WorkspaceAutocompleteByType(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,WorkspaceAdapterMixin,Select2QuerySetViewView to provide autocompletion for Workspace data models by type.
- get_queryset()
Filter the queryset with GET[‘q’].
- class anvil_consortium_manager.views.WorkspaceClone(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,WorkspaceAdapterMixin,SingleObjectMixin,FormView- form_valid(form)
If the form(s) are valid, save the associated model(s) and create the workspace on AnVIL.
- forms_invalid(form, workspace_data_formset)
If the form(s) are invalid, render the invalid form.
- get(request, *args, **kwargs)
Handle GET requests: instantiate a blank version of the form.
- get_context_data(**kwargs)
Insert the workspace data formset into the context dict.
- get_form(form_class=None)
Return an instance of the form to be used in this view.
- get_form_class()
Return the form class to use.
- get_initial()
Add the authorization domains of the workspace to be cloned to the form.
- get_object(queryset=None)
Return the workspace to clone.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- get_workspace_data_formset()
Return an instance of the workspace data form to be used in this view.
- post(request, *args, **kwargs)
Handle POST requests: instantiate the forms instances with the passed POST variables and then check if they are valid.
- success_message = 'Successfully created Workspace on AnVIL.'
- template_name = 'anvil_consortium_manager/workspace_clone.html'
- class anvil_consortium_manager.views.WorkspaceCreate(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,WorkspaceAdapterMixin,FormView- form_valid(form)
If the form(s) are valid, save the associated model(s) and create the workspace on AnVIL.
- forms_invalid(form, workspace_data_formset)
If the form(s) are invalid, render the invalid form.
- get_context_data(**kwargs)
Insert the workspace data formset into the context dict.
- get_form_class()
Return the form class to use.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- get_workspace_data_formset()
Return an instance of the workspace data form to be used in this view.
- post(request, *args, **kwargs)
Handle POST requests: instantiate the forms instances with the passed POST variables and then check if they are valid.
- success_message = 'Successfully created Workspace on AnVIL.'
- template_name = 'anvil_consortium_manager/workspace_create.html'
- class anvil_consortium_manager.views.WorkspaceDelete(*args, **kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,DeleteView- form_valid(form)
Make an API call to AnVIL and then call the delete method on the object.
- get(request, *args, **kwargs)
- get_object(queryset=None)
Return the object the view is displaying.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- message_could_not_delete_workspace_from_app = 'Cannot delete workspace from app due to foreign key restrictions.'
- message_workspace_locked = 'Cannot delete workspace because it is locked.'
- post(request, *args, **kwargs)
- success_message = 'Successfully deleted Workspace on AnVIL.'
- class anvil_consortium_manager.views.WorkspaceDetail(**kwargs)
Bases:
AnVILConsortiumManagerViewRequired,RegisteredWorkspaceAdaptersMixin,WorkspaceAdapterMixin,DetailView- get_context_data(**kwargs)
Insert the single object into the context dict.
- get_object(queryset=None)
Return the object the view is displaying.
- get_template_names()
Return the workspace detail template name specified in the adapter.
- get_workspace_data_object()
- get_workspace_type()
Return the workspace type of this workspace.
- class anvil_consortium_manager.views.WorkspaceGroupSharingCreate(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,CreateViewView to create a new WorkspaceGroupSharing object and share the Workspace with a Group on AnVIL.
- form_class
alias of
WorkspaceGroupSharingForm
- form_valid(form)
If the form is valid, save the associated model and create it on AnVIL.
- get_success_url()
URL to redirect to upon success.
- message_group_not_found = 'Managed Group not found on AnVIL.'
Message to display when the ManagedGroup was not found on AnVIL.
- model
alias of
WorkspaceGroupSharing
- success_message = 'Successfully shared Workspace with Group.'
Message to display when the WorkspaceGroupSharing object was successfully created in the app and on AnVIL.
- class anvil_consortium_manager.views.WorkspaceGroupSharingCreateByGroup(**kwargs)
Bases:
WorkspaceGroupSharingCreateView to create a new WorkspaceGroupSharing object for the group specified in the url.
- form_class
alias of
WorkspaceGroupSharingForm
- get(request, *args, **kwargs)
Handle GET requests: instantiate a blank version of the form.
- get_context_data(**kwargs)
Insert the form into the context dict.
- get_form(**kwargs)
Get the form and set the inputs to use a hidden widget.
- get_group()
- get_initial()
Return the initial data to use for forms on this view.
- get_success_url()
URL to redirect to upon success.
- message_already_exists = 'This workspace has already been shared with this managed group.'
- message_group_not_found = 'Managed Group not found on AnVIL.'
Message to display when the ManagedGroup was not found on AnVIL.
- model
alias of
WorkspaceGroupSharing
- post(request, *args, **kwargs)
Handle POST requests: instantiate a form instance with the passed POST variables and then check if it’s valid.
- success_message = 'Successfully shared Workspace with Group.'
Message to display when the WorkspaceGroupSharing object was successfully created in the app and on AnVIL.
- template_name = 'anvil_consortium_manager/workspacegroupsharing_form_bygroup.html'
- class anvil_consortium_manager.views.WorkspaceGroupSharingCreateByWorkspace(**kwargs)
Bases:
WorkspaceGroupSharingCreateView to create a new WorkspaceGroupSharing object for the workspace specified in the url.
- form_class
alias of
WorkspaceGroupSharingForm
- get(request, *args, **kwargs)
Handle GET requests: instantiate a blank version of the form.
- get_context_data(**kwargs)
Insert the form into the context dict.
- get_form(**kwargs)
Get the form and set the inputs to use a hidden widget.
- get_initial()
Return the initial data to use for forms on this view.
- get_success_url()
URL to redirect to upon success.
- get_workspace()
- message_already_exists = 'This workspace has already been shared with this managed group.'
- message_group_not_found = 'Managed Group not found on AnVIL.'
Message to display when the ManagedGroup was not found on AnVIL.
- model
alias of
WorkspaceGroupSharing
- post(request, *args, **kwargs)
Handle POST requests: instantiate a form instance with the passed POST variables and then check if it’s valid.
- success_message = 'Successfully shared Workspace with Group.'
Message to display when the WorkspaceGroupSharing object was successfully created in the app and on AnVIL.
- template_name = 'anvil_consortium_manager/workspacegroupsharing_form_byworkspace.html'
- class anvil_consortium_manager.views.WorkspaceGroupSharingCreateByWorkspaceGroup(**kwargs)
Bases:
WorkspaceGroupSharingCreateView to create a new WorkspaceGroupSharing object for the workspace and group specified in the url.
- form_class
alias of
WorkspaceGroupSharingForm
- get(request, *args, **kwargs)
Handle GET requests: instantiate a blank version of the form.
- get_context_data(**kwargs)
Insert the form into the context dict.
- get_form(**kwargs)
Get the form and set the inputs to use a hidden widget.
- get_group()
- get_initial()
Return the initial data to use for forms on this view.
- get_success_url()
URL to redirect to upon success.
- get_workspace()
- message_already_exists = 'This workspace has already been shared with this managed group.'
- message_group_not_found = 'Managed Group not found on AnVIL.'
Message to display when the ManagedGroup was not found on AnVIL.
- model
alias of
WorkspaceGroupSharing
- post(request, *args, **kwargs)
Handle POST requests: instantiate a form instance with the passed POST variables and then check if it’s valid.
- success_message = 'Successfully shared Workspace with Group.'
Message to display when the WorkspaceGroupSharing object was successfully created in the app and on AnVIL.
- template_name = 'anvil_consortium_manager/workspacegroupsharing_form_byworkspacegroup.html'
- class anvil_consortium_manager.views.WorkspaceGroupSharingDelete(*args, **kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,DeleteView- form_valid(form)
Make an API call to AnVIL and then call the delete method on the object.
- get_object(queryset=None)
Return the object the view is displaying.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- model
alias of
WorkspaceGroupSharing
- success_message = 'Successfully removed workspace sharing on AnVIL.'
- class anvil_consortium_manager.views.WorkspaceGroupSharingDetail(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,DetailView- get_context_data(**kwargs)
Insert the single object into the context dict.
- get_object(queryset=None)
Return the object the view is displaying.
- model
alias of
WorkspaceGroupSharing
- class anvil_consortium_manager.views.WorkspaceGroupSharingList(**kwargs)
Bases:
AnVILConsortiumManagerStaffViewRequired,SingleTableView- model
alias of
WorkspaceGroupSharing
- table_class
alias of
WorkspaceGroupSharingStaffTable
- class anvil_consortium_manager.views.WorkspaceGroupSharingUpdate(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,UpdateViewView to update a WorkspaceGroupSharing object and on AnVIL.
- fields = ('access', 'can_compute')
- form_valid(form)
If the form is valid, save the associated model and create it on AnVIL.
- get_object(queryset=None)
Return the object the view is displaying.
- model
alias of
WorkspaceGroupSharing
- success_message = 'Successfully updated Workspace sharing.'
Message to display when the WorkspaceGroupSharing object was successfully updated.
- template_name = 'anvil_consortium_manager/workspacegroupsharing_update.html'
- class anvil_consortium_manager.views.WorkspaceImport(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,WorkspaceAdapterMixin,FormView- form_valid(form)
If the form is valid, check that the workspace exists on AnVIL and save the associated model. Then check if the workspace_data_form is valid.
- forms_invalid(form, workspace_data_formset)
If the form is invalid, render the invalid form.
- get_context_data(**kwargs)
Insert the workspace data form into the context dict.
- get_form()
Return the form instance with the list of available workspaces to import.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- get_workspace_data_formset()
Return an instance of the workspace data form to be used in this view.
- message_anvil_no_access_to_workspace = "Requested workspace doesn't exist or you don't have permission to see it."
- message_anvil_not_owner = 'Not an owner of this workspace.'
- message_error_fetching_workspaces = 'Unable to fetch workspaces from AnVIL.'
- message_no_available_workspaces = 'No workspaces available for import from AnVIL.'
- message_workspace_exists = 'This workspace already exists in the web app.'
- post(request, *args, **kwargs)
Handle POST requests: instantiate the forms instances with the passed POST variables and then check if they are valid.
- success_message = 'Successfully imported Workspace from AnVIL.'
- template_name = 'anvil_consortium_manager/workspace_import.html'
- workspace_choices = None
- class anvil_consortium_manager.views.WorkspaceLandingPage(**kwargs)
Bases:
AnVILConsortiumManagerViewRequired,RegisteredWorkspaceAdaptersMixin,TemplateView- get_context_data(**kwargs)
- template_name = 'anvil_consortium_manager/workspace_landing_page.html'
- class anvil_consortium_manager.views.WorkspaceList(**kwargs)
Bases:
AnVILConsortiumManagerViewRequired,SingleTableMixin,FilterViewDisplay a list of all workspaces using the default table.
- filterset_class
alias of
WorkspaceListFilter
- get_context_data(**kwargs)
Overridden version of .TemplateResponseMixin to inject the table into the template’s context.
- get_table_class()
Return the class to use for the table.
- ordering = ('billing_project__name', 'name')
- template_name = 'anvil_consortium_manager/workspace_list.html'
- class anvil_consortium_manager.views.WorkspaceListByType(**kwargs)
Bases:
AnVILConsortiumManagerViewRequired,WorkspaceAdapterMixin,SingleTableMixin,FilterViewDisplay a list of workspaces of the given
workspace_type.- filterset_class
alias of
WorkspaceListFilter
- get_queryset()
Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
- get_table_class()
Use the adapter to get the table class.
- get_template_names()
Return the workspace list template name specified in the adapter.
- ordering = ('billing_project__name', 'name')
- class anvil_consortium_manager.views.WorkspaceUpdate(**kwargs)
Bases:
AnVILConsortiumManagerStaffEditRequired,SuccessMessageMixin,WorkspaceAdapterMixin,UpdateViewView to update information about an Account.
- form_valid(form, workspace_data_formset)
If the form(s) are valid, save the associated model(s) and create the workspace on AnVIL.
- forms_invalid(form, workspace_data_formset)
If the form(s) are invalid, render the invalid form.
- get_context_data(**kwargs)
Insert the workspace data formset into the context dict.
- get_form_class()
Return the form class to use in this view.
- get_object(queryset=None)
Return the object the view is displaying.
- get_success_url()
Return the URL to redirect to after processing a valid form.
- get_workspace_data_formset()
Return an instance of the workspace data form to be used in this view.
- get_workspace_data_object()
- get_workspace_type()
Return the workspace type of this workspace.
- post(request, *args, **kwargs)
Handle POST requests: instantiate the forms instances with the passed POST variables and then check if they are valid.
- slug_field = 'name'
- success_message = 'Successfully updated Workspace.'
- template_name = 'anvil_consortium_manager/workspace_update.html'