Changeset - 214811430c07
[Not reviewed]
0 1 0
Christopher Neugebauer - 4 years ago 2017-08-09 18:31:17
chrisjrn@gmail.com
Configure important things by environment variables
1 file changed with 13 insertions and 4 deletions:
0 comments (0 inline, 0 general)
pinaxcon/settings.py
Show inline comments
...
 
@@ -22,3 +22,3 @@ DATABASES['default'].update(db_from_env)
 

	
 
ALLOWED_HOSTS = ["localhost", ".herokuapp.com"]
 
ALLOWED_HOSTS = ["localhost", ".herokuapp.com", ".northbaypython.org"]
 

	
...
 
@@ -223,7 +223,16 @@ FIXTURE_DIRS = [
 

	
 
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
 
# Heroku: Get email configuration from environment variables.
 

	
 
ACCOUNT_OPEN_SIGNUP = True
 
EMAIL_BACKEND = os.environ.get("DJANGO_EMAIL_BACKEND", "django.core.mail.backends.console.EmailBackend")  # noqa
 
EMAIL_HOST = os.environ.get("DJANGO_EMAIL_HOST", "")
 
EMAIL_PORT = int(os.environ.get("DJANGO_EMAIL_PORT", 25))
 
EMAIL_HOST_USER = os.environ.get("DJANGO_EMAIL_HOST_USER", "")
 
EMAIL_HOST_PASSWORD = os.environ.get("DJANGO_EMAIL_HOST_PASSWORD", "")
 
EMAIL_USE_TLS = bool(os.environ.get("DJANGO_EMAIL_USE_TLS", False))
 
EMAIL_USE_SSL = bool(os.environ.get("DJANGO_EMAIL_USE_SSL", False))
 

	
 
# We need to explicitly switch on signups.
 
ACCOUNT_OPEN_SIGNUP = bool(os.environ.get("DJANGO_ACCOUNT_OPEN_SIGNUP", False))
 
ACCOUNT_EMAIL_UNIQUE = True
 
ACCOUNT_EMAIL_CONFIRMATION_REQUIRED = False
 
ACCOUNT_EMAIL_CONFIRMATION_REQUIRED = False if DEBUG else True
 
ACCOUNT_LOGIN_REDIRECT_URL = "home"
0 comments (0 inline, 0 general)