Skip to content

Commit e938e2e

Browse files
committed
fix: change error
1 parent a2d1a69 commit e938e2e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

core/settings/production.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
from .base import * # noqa
44

55
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
6-
EMAIL_HOST = "'smtp.google.com'"
6+
EMAIL_HOST = "smtp.gmail.com"
77
EMAIL_PORT = 587
88
EMAIL_HOST_USER = os.getenv("EMAIL_HOST_USER")
99
EMAIL_HOST_PASSWORD = os.getenv("EMAIL_HOST_PASSWORD")
1010
EMAIL_USE_TLS = True
1111

12-
DATABASES_ENVIRON = os.getenv("DATABASE_ENVIRON")
12+
DATABASE_ENVIRON = os.getenv("DATABASE_ENVIRON")
1313

14-
if DATABASES_ENVIRON == "postgresql":
14+
if DATABASE_ENVIRON == "postgresql":
1515
DATABASES = {
1616
"default": {
1717
"ENGINE": f"django.db.backends.postgresql",
@@ -22,7 +22,7 @@
2222
"PORT": int(os.getenv("DATABASE_PORT"))
2323
}
2424
}
25-
elif DATABASES_ENVIRON == 'mysql':
25+
elif DATABASE_ENVIRON == 'mysql':
2626
DATABASES = {
2727
"default": {
2828
"ENGINE": f"django.db.backends.mysql",
@@ -36,3 +36,5 @@
3636
}
3737
}
3838
}
39+
else:
40+
raise ValueError("DATABASES_ENVIRON is not set correctly. Please set it to 'postgresql' or 'mysql'. ")

0 commit comments

Comments
 (0)