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 90a6769..57f812b 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ