From 89d4a79ad5976a9d6a8e5efe91e4d6299ce5f252 Mon Sep 17 00:00:00 2001 From: DJ Gillespie Date: Mon, 6 Apr 2020 17:14:25 -0600 Subject: [PATCH] updated to use postgres db --- core/settings.py | 12 ++++++------ db.sqlite3 | Bin 274432 -> 274432 bytes 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/settings.py b/core/settings.py index d2999a0..228aff9 100644 --- a/core/settings.py +++ b/core/settings.py @@ -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' diff --git a/db.sqlite3 b/db.sqlite3 index 90a67696fee7ee08dc29982805ddf9def382df70..57f812ba47e3a6875ed00f37f7e5b042c01e6252 100644 GIT binary patch delta 294 zcmZp8AkgqYV1hJb&O{k!#+;1_KKUXhx&~$nMn+a9hE_)AdKQL;CPs$M2lBTc$Y*p( z;A7=H#lUxnw}r=zn}hSzWCWX%FLVtV0wMg@?%D=d7h{2mPacldMp zxAS}OPueV)V8*Yi!tBdP$Qst^x$haL1GT3y@IT@|%)f-cl|OB>U_l7KvK+G`qmhA; ffvy2IN3epVr|aBdlxko6pAm?ewlDtA9BTjoqKZ^R delta 155 zcmV;M0A&Aw;1Gb|5Re-IX^|X50co*dOm7r2EiyGAFfckaI65*jE;%`B0XPqnU=SylZSMh>3|oEZhMahok=ihok=j Jx1;|9T`(;|F%bX&