Skip to content

Commit

Permalink
ch(deployment): Edited heroku configs
Browse files Browse the repository at this point in the history
  • Loading branch information
lornatumuhairwe committed Sep 7, 2017
1 parent 3042800 commit 24107a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ __pycache__/
.coverage
hc.sqlite
static-collected

hc/local_settings.py
.DS_Store
static/.DS_Store
.vscode/
Expand Down
13 changes: 10 additions & 3 deletions hc/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@
PUSHBULLET_CLIENT_ID = None
PUSHBULLET_CLIENT_SECRET = None

import dj_database_url
DATABASES['default'] = dj_database_url.config()

SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

ALLOWED_HOSTS = ['*']
Expand All @@ -162,3 +159,13 @@
from .local_settings import *
else:
warnings.warn("local_settings.py not found, using defaults")

if os.getcwd() == "/app":
from dj_database_url import parse
DATABASE_URL = os.getenv('DATABASE_URL')
DATABASES = {
"default": parse(
DATABASE_URL,
conn_max_age = 600
)
}

0 comments on commit 24107a2

Please sign in to comment.