Parse DB_OPTIONS dict

This commit is contained in:
Vegetto
2021-02-20 16:54:42 +01:00
committed by GitHub
parent 5aa918f478
commit 804adde964

View File

@@ -175,7 +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': os.getenv('DB_OPTIONS') if os.getenv('DB_OPTIONS') else [],
'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'),