File tree 3 files changed +16
-4
lines changed
3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change
1
+ EMAIL_HOST = ' smtp.mailtrap.io'
2
+ EMAIL_HOST_USER = ' '
3
+ EMAIL_HOST_PASSWORD = ' '
4
+ EMAIL_PORT = ' 2525'
Original file line number Diff line number Diff line change
1
+ EMAIL_HOST = ' smtp.mailtrap.io'
2
+ EMAIL_HOST_USER = ' '
3
+ EMAIL_HOST_PASSWORD = ' '
4
+ EMAIL_PORT = ' 2525'
Original file line number Diff line number Diff line change 11
11
"""
12
12
13
13
from pathlib import Path
14
+ from dotenv import load_dotenv
15
+ import os
14
16
17
+ load_dotenv ()
15
18
# Build paths inside the project like this: BASE_DIR / 'subdir'.
16
19
BASE_DIR = Path (__file__ ).resolve ().parent .parent
17
20
18
21
22
+
19
23
# Quick-start development settings - unsuitable for production
20
24
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
21
25
127
131
CRISPY_TEMPLATE_PACK = 'bootstrap4'
128
132
129
133
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
130
- EMAIL_HOST = 'smtp.mailtrap.io'
131
- EMAIL_HOST_USER = ''
132
- EMAIL_HOST_PASSWORD = ''
133
- EMAIL_PORT = '2525'
134
+ EMAIL_HOST = os . getenv ( 'EMAIL_HOST' )
135
+ EMAIL_HOST_USER = os . getenv ( 'EMAIL_HOST_USER' )
136
+ EMAIL_HOST_PASSWORD = os . getenv ( 'EMAIL_HOST_PASSWORD' )
137
+ EMAIL_PORT = os . getenv ( 'EMAIL_HOST_PASSWORD' )
You can’t perform that action at this time.
0 commit comments