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/'