From 113e8f8b49280d84dc2853b5cf91cb524cb910f6 Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Mon, 13 Jan 2014 18:59:53 -0500 Subject: [PATCH] Email settings --- karmaworld/secret/email.py.example | 4 ++++ karmaworld/settings/common.py | 2 +- karmaworld/settings/prod.py | 9 ++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 karmaworld/secret/email.py.example diff --git a/karmaworld/secret/email.py.example b/karmaworld/secret/email.py.example new file mode 100644 index 0000000..c0f726f --- /dev/null +++ b/karmaworld/secret/email.py.example @@ -0,0 +1,4 @@ + +SMTP_USERNAME = '' +SMTP_PASSWORD = '' + diff --git a/karmaworld/settings/common.py b/karmaworld/settings/common.py index 4b20c2f..580ffdb 100644 --- a/karmaworld/settings/common.py +++ b/karmaworld/settings/common.py @@ -23,7 +23,7 @@ DJANGO_ROOT = dirname(dirname(abspath(__file__))) SITE_ROOT = dirname(DJANGO_ROOT) # Site name: -SITE_NAME = basename(DJANGO_ROOT) +SITE_NAME = 'KarmaNotes' # Add our project to our pythonpath, this way we don't need to type our project # name in our dotted import paths: diff --git a/karmaworld/settings/prod.py b/karmaworld/settings/prod.py index b20e37e..d4560ee 100644 --- a/karmaworld/settings/prod.py +++ b/karmaworld/settings/prod.py @@ -22,18 +22,21 @@ from karmaworld.secret.db_settings import PROD_DB_NAME from karmaworld.secret.db_settings import PROD_DB_USERNAME from karmaworld.secret.db_settings import PROD_DB_PASSWORD +from karmaworld.secret.email import SMTP_USERNAME +from karmaworld.secret.email import SMTP_PASSWORD + ########## EMAIL CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host -EMAIL_HOST = environ.get('EMAIL_HOST', 'smtp.gmail.com') +EMAIL_HOST = environ.get('EMAIL_HOST', 'email-smtp.us-east-1.amazonaws.com') # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host-password -EMAIL_HOST_PASSWORD = environ.get('EMAIL_HOST_PASSWORD', '') +EMAIL_HOST_PASSWORD = environ.get('EMAIL_HOST_PASSWORD', SMTP_PASSWORD) # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host-user -EMAIL_HOST_USER = environ.get('EMAIL_HOST_USER', 'your_email@example.com') +EMAIL_HOST_USER = environ.get('EMAIL_HOST_USER', SMTP_USERNAME) # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-port EMAIL_PORT = environ.get('EMAIL_PORT', 587) -- 2.25.1