Configuration¶
Some Indigo config options can be set using environment variables. Others are
Django configuration options and must be set in your
settings.py file.
Options that can be set using environment variables:
AWS_ACCESS_KEY_IDRequired for production. The AWS access key ID for the account with write-access to the S3 bucket used for storing attachments.
AWS_SECRET_ACCESS_KEYRequired for production. The AWS secret access key for the account with write-access to the S3 bucket used for storing attachments.
AWS_S3_BUCKETRequired for production. The name of the S3 bucket for storing attachments.
AWS_S3_HOSTThe regional S3 endpoint to use. Optional. Default:
s3-eu-west-1.amazonaws.comDATABASE_URLRequired. The URL of the database to use, in the format:
postgres://USER:PASSWORD@HOST:PORT/DBNAME.DJANGO_DEBUGThe Django
DEBUGsetting. Everything other thantruemeans False. This should always befalsein production. Default:trueDJANGO_DEFAULT_FROM_EMAILThe Django
DEFAULT_FROM_EMAILsetting: who do emails come from? UsesSUPPORT_EMAILby default.DJANGO_EMAIL_HOSTThe Django
EMAIL_HOSTsetting. The SMTP host through which to send user emails such as password resets.DJANGO_EMAIL_HOST_PASSWORDThe Django
EMAIL_HOST_PASSWORDsetting. The SMTP password.DJANGO_EMAIL_HOST_PORTThe Django
EMAIL_HOST_PORTsetting. The SMTP port (default: 25).DJANGO_EMAIL_HOST_USERThe Django
EMAIL_HOST_USERsetting. The SMTP username.DJANGO_SECRET_KEYRequired if DJANGO_DEBUG is not true. The Django
SECRET_KEYsetting. In production you should use a random (and secret) string.GOOGLE_ANALYTICS_IDGoogle Analytics ID for website tracking. Only used when
DEBUGis False.SUPPORT_EMAILRequired Email address users can email for help.
INDIGO.EMAIL_FAIL_SILENTLYShould email sending fail silently?
INDIGO.GSHEETS_API_CREDSJSON of Google Sheets API credentials token details, if you want Indigo to be able to talk to Google Sheets directly. Otherwise, Indigo will use CSV export and the Google Sheet will need to be publicly accessible.
For details on setting up Google Sheets for API access, see https://medium.com/@denisluiz/python-with-google-sheets-service-account-step-by-step-8f74c26ed28e
INDIGO.NOTIFICATION_EMAILS_BACKGROUNDShould notification emails be sent asynchronously in the background? Default is False. See django-background-tasks documentation.
INDIGO.PRUNE_DELETED_DOCUMENT_DAYSIf this is set, deleted documents older than the specified number of days will be deleted. Background tasks must be run to do so. Defaults to 90 days.
INDIGO.PRUNE_DOCUMENT_VERSIONS_DAYSIf this is set, document versions older than the specified number of days will be deleted, except the
INDIGO.PRUNE_DOCUMENT_VERSIONS_KEEPmost recent. Defaults to 90 days.INDIGO.PRUNE_DOCUMENT_VERSIONS_KEEPThe number of recent document versions to keep when pruning document versions. Defaults to 5.
SENTRY_DSNIf this is set error reporting will be enabled and handled using Sentry.io. See Where to Find Your DSN.
Options that must be set in your settings.py:
INDIGO.DOCTYPESA list of
(label, code)pairs of Akoma Ntoso document types that can be created, such as('Act', 'act'). See http://docs.oasis-open.org/legaldocml/akn-core/v1.0/os/part1-vocabulary/akn-core-v1.0-os-part1-vocabulary.html#_Toc523925025
Authentication¶
Indigo uses django-allauth for user authentication and social accounts, configuration is as per the django-allauth documentation.
Social accounts¶
By default, Indigo doesn’t have any social account authentication enabled. To enable a social provider, follow the documentation for django-allauth. Namely, you’ll need to:
Include the account provider in
INSTALLED_APPSin yoursettings.pyfile:Get the appropriate client and secret keys from the provider, and create a social app in the admin interface.