Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Collection of Practice
2019
1606875806-practice
Commits
5c52c99a
Commit
5c52c99a
authored
Dec 24, 2019
by
Izzan Fakhril Islam
Browse files
change email backend to locmem in gitlab env
parent
4a5697b4
Pipeline
#28559
failed with stages
in 13 minutes and 7 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tutorial/settings.py
View file @
5c52c99a
...
...
@@ -97,6 +97,7 @@ if PRODUCTION:
DATABASE_URL
=
os
.
environ
[
'DATABASE_URL'
]
conn
=
psycopg2
.
connect
(
DATABASE_URL
,
sslmode
=
'require'
)
DATABASES
[
'default'
]
=
dj_database_url
.
config
(
conn_max_age
=
800
,
ssl_require
=
True
)
EMAIL_BACKEND
=
'django.core.mail.backends.smtp.EmailBackend'
elif
GITLAB_ENV
:
DATABASES
=
{
'default'
:
{
...
...
@@ -111,6 +112,7 @@ elif GITLAB_ENV:
}
}
}
EMAIL_BACKEND
=
'django.core.mail.backends.locmem.EmailBackend'
else
:
DATABASES
=
{
'default'
:
{
...
...
@@ -125,6 +127,7 @@ else:
}
}
}
EMAIL_BACKEND
=
'django.core.mail.backends.smtp.EmailBackend'
# Password validation
# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
...
...
@@ -144,7 +147,7 @@ AUTH_PASSWORD_VALIDATORS = [
},
]
EMAIL_BACKEND
=
'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST
=
'smtp.gmail.com'
EMAIL_HOST_USER
=
'rvd.cena@gmail.com'
EMAIL_HOST_PASSWORD
=
env
(
"EMAIL_HOST_PASSWORD"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment