mirror of https://github.com/snachodog/mybuddy.git
127 lines
2.7 KiB
Python
127 lines
2.7 KiB
Python
import os
|
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
BASE_DIR = os.path.dirname(
|
|
os.path.dirname(
|
|
os.path.dirname(
|
|
os.path.abspath(__file__)
|
|
)
|
|
)
|
|
)
|
|
|
|
|
|
# Applications
|
|
# https://docs.djangoproject.com/en/1.11/ref/applications/
|
|
|
|
INSTALLED_APPS = [
|
|
'api',
|
|
'babyblotter',
|
|
'core',
|
|
'dashboard',
|
|
'reports',
|
|
|
|
'rest_framework',
|
|
'widget_tweaks',
|
|
|
|
'django.contrib.admin',
|
|
'django.contrib.auth',
|
|
'django.contrib.contenttypes',
|
|
'django.contrib.sessions',
|
|
'django.contrib.messages',
|
|
'django.contrib.staticfiles',
|
|
]
|
|
|
|
# Middleware
|
|
# https://docs.djangoproject.com/en/1.11/ref/middleware/
|
|
|
|
MIDDLEWARE = [
|
|
'django.middleware.security.SecurityMiddleware',
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
'django.middleware.common.CommonMiddleware',
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
]
|
|
|
|
|
|
# URL dispatcher
|
|
# https://docs.djangoproject.com/en/1.11/topics/http/urls/
|
|
|
|
ROOT_URLCONF = 'babyblotter.urls'
|
|
|
|
|
|
# Templates
|
|
# https://docs.djangoproject.com/en/1.11/ref/templates/upgrading/#the-templates-settings
|
|
|
|
TEMPLATES = [
|
|
{
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
'DIRS': [],
|
|
'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',
|
|
],
|
|
},
|
|
},
|
|
]
|
|
|
|
|
|
# WGSI
|
|
# https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
|
|
|
|
WSGI_APPLICATION = 'babyblotter.wsgi.application'
|
|
|
|
|
|
# Authentication
|
|
# https://docs.djangoproject.com/en/1.11/topics/auth/default/
|
|
|
|
LOGIN_REDIRECT_URL = '/'
|
|
|
|
LOGIN_URL = '/login/'
|
|
|
|
LOGOUT_REDIRECT_URL = '/login/'
|
|
|
|
|
|
# Internationalization
|
|
# https://docs.djangoproject.com/en/1.11/topics/i18n/
|
|
|
|
LANGUAGE_CODE = 'en-us'
|
|
|
|
TIME_ZONE = 'America/New_York'
|
|
|
|
USE_I18N = True
|
|
|
|
USE_L10N = True
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
# https://docs.djangoproject.com/en/1.11/howto/static-files/
|
|
|
|
STATIC_URL = '/static/'
|
|
|
|
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
|
|
|
STATICFILES_DIRS = [
|
|
os.path.join(BASE_DIR, 'babyblotter', 'static'),
|
|
]
|
|
|
|
|
|
# Django Rest Framework
|
|
# http://www.django-rest-framework.org/#
|
|
|
|
REST_FRAMEWORK = {
|
|
'DEFAULT_PERMISSION_CLASSES': [
|
|
'api.permissions.BabyBlotterDjangoModelPermissions'
|
|
],
|
|
'DEFAULT_RENDERER_CLASSES': (
|
|
'rest_framework.renderers.JSONRenderer',
|
|
)
|
|
}
|