Update settings for Heroku

This commit is contained in:
Gergely Polonkai 2015-10-20 22:52:18 +02:00
parent 2fd2654d4b
commit e9f67e2dda

View File

@ -24,8 +24,9 @@ DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['*']
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_FOR')
# Application definition
@ -60,6 +61,13 @@ WSGI_APPLICATION = 'duckbook.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
try:
import dj_database_url
DATABASES = {
'default': dj_database_url.config()
}
except ImportError:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
@ -87,6 +95,10 @@ USE_TZ = True
STATIC_URL = '/static/'
STATIC_ROOT = 'static'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
TEST_RUNNER = 'junorunner.testrunner.TestSuiteRunner'
MAX_DUCK_LEVEL = 5