Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix travis failure, update settings.DATABASES
  • Loading branch information
tapaswenipathak authored Oct 16, 2017
commit 82daaa6f21ebb4a4d05b82d819a2069761b32b8f
18 changes: 10 additions & 8 deletions oshc/oshc/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import dj_database_url

BASE_DIR = os.path.dirname(os.path.dirname(__file__))

# Quick-start development settings - unsuitable for production
Expand All @@ -22,8 +23,6 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.getenv("DEBUG", False)

SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

ALLOWED_HOSTS = ['*']

# Tuple of people who get error notifications
Expand Down Expand Up @@ -76,7 +75,15 @@
},
]

DATABASES = { 'default': dj_database_url.config() }
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}

# Get DATABASE_URL environment variable and update default DATABASE settings
# This setting is required for Heroku
Expand Down Expand Up @@ -111,8 +118,3 @@
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'main/'),
)

try:
from local_settings import *
except ImportError:
pass