Settings

This project relies extensively on environment settings which will not work with Apache/mod_wsgi setups. It has been deployed successfully with both Gunicorn/Nginx and even uWSGI/Nginx.

For configuration purposes, the following table maps environment variables to their Django setting and project settings:

Environment VariableDjango SettingDevelopment DefaultProduction Default
DJANGO_READ_DOT_ENV_FILEREAD_DOT_ENV_FILETrueFalse
DATABASE_URLDATABASESauto w/ Docker; postgres://project_slug w/oraises error
DJANGO_ADMIN_URLn/a'admin/'raises error
DJANGO_DEBUGDEBUGTrueFalse
DJANGO_SECRET_KEYSECRET_KEYauto-generatedraises error
DJANGO_SECURE_BROWSER_XSS_FILTERSECURE_BROWSER_XSS_FILTERn/aTrue
DJANGO_SECURE_SSL_REDIRECTSECURE_SSL_REDIRECTn/aFalse
DJANGO_SECURE_CONTENT_TYPE_NOSNIFFSECURE_CONTENT_TYPE_NOSNIFFn/aTrue
DJANGO_SECURE_FRAME_DENYSECURE_FRAME_DENYn/aTrue
DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINSSECURE_HSTS_INCLUDE_SUBDOMAINSn/aTrue
DJANGO_SESSION_COOKIE_HTTPONLYSESSION_COOKIE_HTTPONLYn/aTrue
DJANGO_SESSION_COOKIE_SECURESESSION_COOKIE_SECUREn/aFalse
DJANGO_DEFAULT_FROM_EMAILDEFAULT_FROM_EMAILn/a"your_project_name noreply@your_domain_name"
DJANGO_SERVER_EMAILSERVER_EMAILn/a"your_project_name noreply@your_domain_name"
DJANGO_EMAIL_SUBJECT_PREFIXEMAIL_SUBJECT_PREFIXn/a"[your_project_name] "
DJANGO_ALLOWED_HOSTSALLOWED_HOSTS["*"]['your_domain_name']

The following table lists settings and their defaults for third-party applications

Environment VariableDjango SettingDevelopment DefaultProduction Default
DJANGO_AWS_ACCESS_KEY_IDAWS_ACCESS_KEY_IDn/aFalse
DJANGO_AWS_SECRET_ACCESS_KEYAWS_SECRET_ACCESS_KEYn/araises error
DJANGO_AWS_STORAGE_BUCKET_NAMEAWS_STORAGE_BUCKET_NAMEn/araises error
DJANGO_AWS_S3_REGION_NAMEAWS_S3_REGION_NAMEn/aNone
DJANGO_AWS_S3_CUSTOM_DOMAINAWS_S3_CUSTOM_DOMAINn/aNone
SENTRY_DSNSENTRY_DSNn/araises error
DJANGO_SENTRY_LOG_LEVELSENTRY_LOG_LEVELn/araises error

Other

DJANGO_ACCOUNT_ALLOW_REGISTRATION (=True)

Allow enable or disable user registration through django-allauth without disabling other characteristics like authentication and account management. (Django Setting: ACCOUNT_ALLOW_REGISTRATION)