updated to use postgres db

This commit is contained in:
DJ Gillespie 2020-04-06 17:14:25 -06:00
parent bd19a6061f
commit 89d4a79ad5
2 changed files with 6 additions and 6 deletions

View File

@ -11,10 +11,14 @@ https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
import dj_database_url
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DEFAULT_CONNECTION = dj_database_url.parse(os.environ.get("DATABASE_URL"))
DATABASES = {"default": DEFAULT_CONNECTION,}
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
@ -66,6 +70,7 @@ MIDDLEWARE = [
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
]
CORS_ORIGIN_WHITELIST = [
@ -97,12 +102,7 @@ WSGI_APPLICATION = 'core.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
AUTH_USER_MODEL = 'user.User'

Binary file not shown.