Skip to content

Commit

Permalink
refactor(optimize-settings): make a few settings env variables; add c…
Browse files Browse the repository at this point in the history
…onstance to INSTALLED_APPS
  • Loading branch information
WoosterInitiative committed Mar 19, 2024
1 parent 318eb75 commit 68c10c3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env-sample-production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DATABASE_URL=postgres://wooster_django:[email protected]:15432/postgres
2 changes: 2 additions & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Base settings to build other settings files upon.
"""

from pathlib import Path

import environ # type:ignore
Expand Down Expand Up @@ -94,6 +95,7 @@
"allauth",
"allauth.account",
"allauth.socialaccount",
"constance",
]

LOCAL_APPS = [
Expand Down
4 changes: 2 additions & 2 deletions config/settings/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
# EMAIL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#email-host
EMAIL_HOST = "10.46.119.26"
EMAIL_HOST = env.str("DJANGO_EMAIL_HOST", default="localhost")
# https://docs.djangoproject.com/en/dev/ref/settings/#email-port
EMAIL_PORT = 1025
EMAIL_PORT = env.int("DJANGO_EMAIL_PORT", default=1025)

# WhiteNoise
# ------------------------------------------------------------------------------
Expand Down

0 comments on commit 68c10c3

Please sign in to comment.