Skip to content

Commit

Permalink
Fix app registry issue
Browse files Browse the repository at this point in the history
  • Loading branch information
soyapark committed Sep 25, 2020
1 parent 89b3e32 commit cb6e9a1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@
# hook django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "http_handler.settings")

import django
django.setup()

# the config/boot.py will turn these values into variables set in settings
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ services:
ports:
- "8825"
environment:
- RELAY_HOST=${RELAY_HOST}
- GMAIL_USER=${GMAIL_USER}
- GMAIL_PASSWORD=${GMAIL_PASSWORD}
- PORT=8825
Expand Down
8 changes: 3 additions & 5 deletions http_handler/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,10 @@ def _get_website():

LOGIN_REDIRECT_URL = "/"

EMAIL_HOST = 'localhost'

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_USE_TLS = False
DEFAULT_EMAIL = 'no-reply@' + BASE_URL
EMAIL_USE_TLS = True
DEFAULT_EMAIL = 'no-reply@' + "localhost" if "localhost" in BASE_URL else BASE_URL
DEFAULT_FROM_EMAIL = DEFAULT_EMAIL


Expand Down
2 changes: 1 addition & 1 deletion smtp_handler/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

logger = logging.getLogger('murmur')

HOST = BASE_URL
HOST = "localhost" if "localhost" in BASE_URL else BASE_URL
NO_REPLY = DEFAULT_FROM_EMAIL
POST_SUFFIX = '__post__'
FOLLOW_SUFFIX = '__follow__'
Expand Down

0 comments on commit cb6e9a1

Please sign in to comment.