Skip to content

Commit e7f64f3

Browse files
committed
Use os.environ to load sensitive settings
1 parent 07e8d55 commit e7f64f3

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pythonkc_site/settings.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@
158158
CONTACT_EMAIL_FROM = 'noreply@pythonkc.com'
159159
CONTACT_EMAIL_TO = ['pythonkc@gmail.com']
160160

161+
EMAIL_HOST = "smtp.gmail.com"
162+
EMAIL_PORT = 587
163+
EMAIL_USE_TLS = True
164+
EMAIL_HOST_USER = os.environ["EMAIL_HOST_USER"]
165+
EMAIL_HOST_PASSWORD = os.environ["EMAIL_HOST_PASSWORD"]
166+
MEETUP_API_KEY = os.environ["MEETUP_API_KEY"]
167+
161168
try:
162169
from local_settings import *
163170
except ImportError:
@@ -183,9 +190,3 @@
183190
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
184191
}
185192
}
186-
187-
188-
try:
189-
from private_settings import *
190-
except ImportError:
191-
pass

0 commit comments

Comments
 (0)