|
|
|
@ -11,9 +11,11 @@ https://docs.djangoproject.com/en/3.1/ref/settings/
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
from pathlib import Path
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
import dj_database_url
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
|
|
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
|
|
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Quick-start development settings - unsuitable for production
|
|
|
|
# Quick-start development settings - unsuitable for production
|
|
|
|
@ -25,7 +27,7 @@ SECRET_KEY = 'kwuq4$3jeof1(0!k7)+1@40t5s3pe5uo2-amnsl50rsrhwncs0'
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
|
|
DEBUG = True
|
|
|
|
DEBUG = True
|
|
|
|
|
|
|
|
|
|
|
|
ALLOWED_HOSTS = []
|
|
|
|
ALLOWED_HOSTS = ['localhost', 'shrouded-depths-07664.herokuapp.com']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Application definition
|
|
|
|
# Application definition
|
|
|
|
@ -44,6 +46,7 @@ INSTALLED_APPS = [
|
|
|
|
|
|
|
|
|
|
|
|
MIDDLEWARE = [
|
|
|
|
MIDDLEWARE = [
|
|
|
|
'corsheaders.middleware.CorsMiddleware',
|
|
|
|
'corsheaders.middleware.CorsMiddleware',
|
|
|
|
|
|
|
|
'whitenoise.middleware.WhiteNoiseMiddleware',
|
|
|
|
'django.middleware.security.SecurityMiddleware',
|
|
|
|
'django.middleware.security.SecurityMiddleware',
|
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
|
|
'django.middleware.common.CommonMiddleware',
|
|
|
|
'django.middleware.common.CommonMiddleware',
|
|
|
|
@ -53,7 +56,7 @@ MIDDLEWARE = [
|
|
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
|
|
]
|
|
|
|
]
|
|
|
|
CORS_ALLOW_ALL_ORIGINS = True
|
|
|
|
CORS_ALLOW_ALL_ORIGINS = True
|
|
|
|
|
|
|
|
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
|
|
|
|
ROOT_URLCONF = 'timer_backend.urls'
|
|
|
|
ROOT_URLCONF = 'timer_backend.urls'
|
|
|
|
|
|
|
|
|
|
|
|
TEMPLATES = [
|
|
|
|
TEMPLATES = [
|
|
|
|
@ -88,6 +91,9 @@ DATABASES = {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
db_from_env = dj_database_url.config(conn_max_age=600)
|
|
|
|
|
|
|
|
DATABASES['default'].update(db_from_env)
|
|
|
|
|
|
|
|
|
|
|
|
# Password validation
|
|
|
|
# Password validation
|
|
|
|
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
|
|
|
|
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
|
|
|
|
|
|
|
|
|
|
|
|
@ -125,3 +131,4 @@ USE_TZ = True
|
|
|
|
# https://docs.djangoproject.com/en/3.1/howto/static-files/
|
|
|
|
# https://docs.djangoproject.com/en/3.1/howto/static-files/
|
|
|
|
|
|
|
|
|
|
|
|
STATIC_URL = '/static/'
|
|
|
|
STATIC_URL = '/static/'
|
|
|
|
|
|
|
|
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
|
|
|
|