0 1 0
Brett Smith - 13 months ago 2019-09-30 15:19:54
brettcsmith@brettcsmith.org
settings: Read more from environment variables.
1 file changed with 3 insertions and 5 deletions:
↑ Collapse Diff ↑
...
 
@@ -6,7 +6,7 @@ PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir
6 6
 
PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))
7 7
 
BASE_DIR = PACKAGE_ROOT
8 8
 

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

	
11 11
 
DATABASES = {
12 12
 
    "default": {
...
 
@@ -24,7 +24,7 @@ import dj_database_url
24 24
 
db_from_env = dj_database_url.config()
25 25
 
DATABASES['default'].update(db_from_env)
26 26
 

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

	
30 30
 
# If DEFAULT_FROM_EMAIL is not set, email will most likely break in prod.
...
 
@@ -35,7 +35,6 @@ if from_email is not None:
35 35
 

	
36 36
 
THEME_CONTACT_EMAIL = os.environ.get("THEME_CONTACT_EMAIL", None)
37 37
 

	
38
 

	
39 38
 
# Local time zone for this installation. Choices can be found here:
40 39
 
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
41 40
 
# although not all choices may be available on all operating systems.
...
 
@@ -43,8 +42,7 @@ THEME_CONTACT_EMAIL = os.environ.get("THEME_CONTACT_EMAIL", None)
43 42
 
# timezone as the operating system.
44 43
 
# If running in a Windows environment this must be set to the same as your
45 44
 
# system time zone.
46
 
TIME_ZONE = os.environ.get("TZ", "America/Los_Angeles")
47
 

	
45
 
TIME_ZONE = os.environ.get("TZ")
48 46
 

	
49 47
 
# Set the email address that will receive errors.
50 48
 
admin_email = os.environ.get("DJANGO_ADMIN_EMAIL", None)
0 comments (0 inline, 0 general)