min.ie/app/settings.py

89 lines
2.1 KiB
Python
Raw Permalink 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
2018-08-07 16:55:22 +01:00
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
2015-01-17 19:06:57 +00:00
# SECURITY WARNING: don't run with debug turned on in production!
2018-08-07 16:55:22 +01:00
DEBUG = os.environ['DEBUG'] or False
TEMPLATE_DEBUG = os.environ['DEBUG'] or False
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 = (
2015-01-18 14:55:53 +00:00
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.staticfiles',
2018-08-07 16:55:22 +01:00
'django.contrib.auth',
2015-01-18 14:55:53 +00:00
'app',
2015-01-17 19:06:57 +00:00
)
2018-08-07 16:55:22 +01:00
MIDDLEWARE = [
2015-01-18 14:55:53 +00:00
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
2018-08-07 16:55:22 +01:00
'whitenoise.middleware.WhiteNoiseMiddleware',
]
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'app/templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
ROOT_URLCONF = 'app.urls'
WSGI_APPLICATION = 'app.wsgi.application'
2015-01-17 19:06:57 +00:00
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
DATABASES = {
2015-01-18 14:55:53 +00:00
'default': dj_database_url.config()
2015-01-17 19:06:57 +00:00
}
# 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/
2018-08-07 16:55:22 +01:00
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
2015-01-17 19:06:57 +00:00
STATIC_URL = '/static/'
STATICFILES_DIRS = (
2015-01-18 14:55:53 +00:00
os.path.join(BASE_DIR, 'static'),
2015-01-17 19:06:57 +00:00
)