diff --git a/.env.template b/.env.template index ecc63919..1146dd9f 100644 --- a/.env.template +++ b/.env.template @@ -13,6 +13,7 @@ TIMEZONE=Europe/Berlin # add only a database password if you want to run with the default postgres, otherwise change settings accordingly DB_ENGINE=django.db.backends.postgresql +# DB_OPTIONS= {} POSTGRES_HOST=db_recipes POSTGRES_PORT=5432 POSTGRES_USER=djangouser diff --git a/recipes/settings.py b/recipes/settings.py index bf38c532..229040d6 100644 --- a/recipes/settings.py +++ b/recipes/settings.py @@ -175,6 +175,7 @@ WSGI_APPLICATION = 'recipes.wsgi.application' DATABASES = { 'default': { 'ENGINE': os.getenv('DB_ENGINE') if os.getenv('DB_ENGINE') else 'django.db.backends.sqlite3', + 'OPTIONS': ast.literal_eval(os.getenv('DB_OPTIONS')) if os.getenv('DB_OPTIONS') else {}, 'HOST': os.getenv('POSTGRES_HOST'), 'PORT': os.getenv('POSTGRES_PORT'), 'USER': os.getenv('POSTGRES_USER'),