min.ie/project/settings.py

78 lines
1.7 KiB
Python
Raw Normal View History

2015-01-17 19:06:57 +00:00
"""
2015-01-18 14:33:53 +00:00
Django settings for min.ie project.
2015-01-17 19:06:57 +00:00
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
import dj_database_url
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# SECURITY WARNING: don't run with debug turned on in production!
2015-01-18 12:41:53 +00:00
DEBUG = os.environ['DEBUG'] == 'True'
TEMPLATE_DEBUG = os.environ['DEBUG'] == 'True'
2015-01-17 19:06:57 +00:00
2015-01-17 23:54:26 +00:00
SECRET_KEY = os.environ['SECRET_KEY']
2015-01-17 19:06:57 +00:00
ALLOWED_HOSTS = ['*']
# Application definition
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.staticfiles',
2015-01-18 14:33:53 +00:00
'app',
2015-01-17 19:06:57 +00:00
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
2015-01-17 23:54:26 +00:00
)
TEMPLATE_DIRS = (
2015-01-18 14:33:53 +00:00
os.path.join(BASE_DIR, 'app/templates'),
2015-01-17 19:06:57 +00:00
)
2015-01-18 14:33:53 +00:00
ROOT_URLCONF = 'project.urls'
2015-01-17 19:06:57 +00:00
2015-01-18 14:33:53 +00:00
WSGI_APPLICATION = 'project.wsgi.application'
2015-01-17 19:06:57 +00:00
# Honor the 'X-Forwarded-Proto' header for request.is_secure()
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
DATABASES = {
'default': dj_database_url.config()
}
# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = False
2015-01-17 19:06:57 +00:00
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/
STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)