From 9fb2e8552fdc8d4a0807a3d191dfd37f9abb5796 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Thu, 10 May 2018 14:20:09 +1000 Subject: [PATCH] Switch the dev environment from SQLite to also use Postgres, so that Postgres-specific data types can be used --- lemoncurry/settings/base.py | 5 +++-- lemoncurry/settings/prod.py | 8 ++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lemoncurry/settings/base.py b/lemoncurry/settings/base.py index 639186e..a912d3e 100644 --- a/lemoncurry/settings/base.py +++ b/lemoncurry/settings/base.py @@ -86,6 +86,7 @@ INSTALLED_APPS = [ 'django_agent_trust', 'django_extensions', 'django_otp', + 'django_otp.plugins.otp_static', 'django_otp.plugins.otp_totp', 'django_rq', 'favicon', @@ -160,8 +161,8 @@ CACHES = { DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': path.join(BASE_DIR, 'db.sqlite3'), + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'lemoncurry' } } diff --git a/lemoncurry/settings/prod.py b/lemoncurry/settings/prod.py index b84aaa5..b2ce7f3 100644 --- a/lemoncurry/settings/prod.py +++ b/lemoncurry/settings/prod.py @@ -9,12 +9,8 @@ DEBUG = False SECRET_KEY = environ['DJANGO_SECRET_KEY'] SERVER_EMAIL = 'lemoncurry@00dani.me' -# Use Postgres instead of SQLite in production. -DATABASES['default'] = { - 'ENGINE': 'django.db.backends.postgresql', - 'NAME': 'lemoncurry', - 'USER': 'lemoncurry', -} +# Authenticate as an app-specific Postgres user in production. +DATABASES['default']['USER'] = 'lemoncurry' SHORT_BASE_URL = 'https://nya.as/'