Skip to content

Commit 778ac2b

Browse files
Merge pull request #222 from jarifibrahim/env-variable
Use env variables to set SMTP settings
2 parents d918ef1 + 2e8da0f commit 778ac2b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: oshc/oshc/settings.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,16 @@
159159

160160
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'main/'), )
161161

162+
EMAIL_HOST = os.getenv('EMAIL_HOST', '')
163+
EMAIL_HOST_USER = os.getenv('EMAIL_ID', '')
164+
EMAIL_HOST_PASSWORD = os.getenv('EMAIL_PASSWORD', '')
165+
EMAIL_PORT = os.getenv('EMAIL_PORT', '')
166+
162167
if DEBUG:
163168
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
164169

165-
EMAIL_HOST = 'smtp.gmail.com'
166-
EMAIL_HOST_USER = 'email'
167-
EMAIL_HOST_PASSWORD = 'password'
168-
EMAIL_PORT = 587
169170
EMAIL_USE_TLS = True
171+
170172
LOGIN_REDIRECT_URL = "/"
171173

172174
CRISPY_TEMPLATE_PACK = 'bootstrap3'

0 commit comments

Comments
 (0)