Quick Start
Install
Install from GitHub:
$ pip install git+https://github.com/UW-GAC/django-anvil-consortium-manager.git
Configure
You will need a service account credentials file that is registered with Terra. XXX Get info from Ben about this.
Required Settings
Add
anvil_consortium_managerto yourINSTALLED_APPS.
INSTALLED_APPS = [ # ... "anvil_consortium_manager", ]If you would like to use the views and templates provided by the app, then you should also install
django-tables2in your project.
Set the
ANVIL_API_SERVICE_ACCOUNT_FILEsetting to the path to the service account credentials file.
ANVIL_API_SERVICE_ACCOUNT_FILE="/<path>/<to>/<service_account>.json"Alternatively, if you would like to browse the app without making any API, just set this to a random string (e.g.,
"foo").
Set the default account and workspace adapters in your settings file.
ANVIL_WORKSPACE_ADAPTERS = ["anvil_consortium_manager.adapters.default.DefaultWorkspaceAdapter"] ANVIL_ACCOUNT_ADAPTER = "anvil_consortium_manager.adapters.default.DefaultAccountAdapter"See the Advanced Usage section for information about customizing Accounts and Workspaces. Note that you can have multiple Workspace adapters, but only one Account adapter.
If you would like to use the templates provided with the app, add the
"anvil_consortium_manager.context_processors.workspace_adapter"context processor to your settings file. This allows the templates to know about which types of workspace adapters that are registered (step 3), and then display links to the correct URLs.Add account linking settings to your settings file.
# Specify the URL name that AccountLink and AccountLinkVerify redirect to. ANVIL_ACCOUNT_LINK_REDIRECT = "home" # Specify the subject for AnVIL account verification emails. ANVIL_ACCOUNT_LINK_EMAIL_SUBJECT = "Verify your AnVIL account email"
Optional settings
If you would like to receive emails when a user links their account, set the ANVIL_ACCOUNT_VERIFY_NOTIFICATION_EMAIL setting in your settings file.
ANVIL_ACCOUNT_VERIFY_NOTIFICATION_EMAIL = "to@example.com"
Permissions
The app provides two different permissions settings.
anvil_project_manager_view- users with this permission can view information, for example lists of users or workspace details.anvil_project_manager_edit- users with this permission can add, delete, or edit models, for example import an account from AnVIL or create a workspace.
We suggest creating two groups, viewers (with anvil_project_manager_view permission) and editors (with both anvil_project_manager_view and anvil_project_manager_edit permission). Users can then be added to the appropriate group. Note that users with edit permission but not view permission will not be able to see lists or detail pages, so anyone granted edit permission should also be granted view permission.