Skip to content

Commit

Permalink
Set environment variables for error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
geekygirlsarah committed Oct 9, 2023
1 parent 8f73357 commit 266b9ff
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion codethesaurus/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware'
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.common.BrokenLinkEmailsMiddleware'
]

ROOT_URLCONF = 'codethesaurus.urls'
Expand Down Expand Up @@ -147,5 +148,15 @@
os.path.join(BASE_DIR, 'static'),
]

# For server error reporting
ADMINS = os.getenv('ADMINS', '')
EMAIL_HOST = os.getenv('EMAIL_HOST', '')
EMAIL_HOST_USER = os.getenv('EMAIL_HOST_USER', '')
EMAIL_HOST_PASSWORD = os.getenv('EMAIL_HOST_PASSWORD', '')
SERVER_EMAIL = os.getenv('SERVER_EMAIL', '')
EMAIL_USE_SSL = os.getenv('EMAIL_USE_SSL', '')
EMAIL_PORT = os.getenv('EMAIL_PORT', '')
EMAIL_USE_TLS = os.getenv('EMAIL_USE_TLS', '')

# Configure Django App for Heroku.
django_on_heroku.settings(locals(), test_runner=False, databases=False, staticfiles=True, logging=True)

0 comments on commit 266b9ff

Please sign in to comment.