Changeset - 15d90dc0bcb2
[Not reviewed]
0 1 0
Brett Smith - 5 years ago 2018-10-04 20:16:41
brettcsmith@brettcsmith.org
settings: Read more from environment variables.
1 file changed with 3 insertions and 5 deletions:
0 comments (0 inline, 0 general)
pinaxcon/settings.py
Show inline comments
...
 
@@ -7,5 +7,5 @@ PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))
 
BASE_DIR = PACKAGE_ROOT
 

	
 
DEBUG = bool(int(os.environ.get("DEBUG", "1")))
 
DEBUG = bool(int(os.environ.get("DJANGO_DEBUG", "1")))
 

	
 
DATABASES = {
...
 
@@ -21,5 +21,5 @@ db_from_env = dj_database_url.config()
 
DATABASES['default'].update(db_from_env)
 

	
 
ALLOWED_HOSTS = [".localhost", ".herokuapp.com", ".northbaypython.org", "127.0.0.1"]
 
ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS", "localhost").split()
 
CANONICAL_HOST = os.environ.get("DJANGO_CANONICAL_HOST", None)
 

	
...
 
@@ -32,5 +32,4 @@ if from_email is not None:
 
THEME_CONTACT_EMAIL = os.environ.get("THEME_CONTACT_EMAIL", None)
 
    
 

	
 
# Local time zone for this installation. Choices can be found here:
 
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
...
 
@@ -40,6 +39,5 @@ THEME_CONTACT_EMAIL = os.environ.get("THEME_CONTACT_EMAIL", None)
 
# If running in a Windows environment this must be set to the same as your
 
# system time zone.
 
TIME_ZONE = os.environ.get("TZ", "America/Los_Angeles")
 

	
 
TIME_ZONE = os.environ.get("TZ")
 

	
 
# Set the email address that will receive errors.
0 comments (0 inline, 0 general)