diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 432561465..3e2575f11 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,4 +1,4 @@ - +dj-database-url django-admin-bootstrapped==2.5.7 django-bootstrap3==7.0.0 django-bower==5.1.0 diff --git a/sapl/settings.py b/sapl/settings.py index b7f4ee978..903a7a016 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -16,6 +16,8 @@ from .temp_suppress_crispy_form_warnings import \ from decouple import config +from dj_database_url import parse as db_url + BASE_DIR = Path(__file__).ancestor(2) @@ -108,14 +110,10 @@ WSGI_APPLICATION = 'sapl.wsgi.application' # https://docs.djangoproject.com/en/1.8/ref/settings/#databases DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': config('NAME'), - 'USER': config('SET_USER'), - 'PASSWORD': config('PASSWORD'), - 'HOST': config('HOST'), - 'PORT': config('PORT'), - } + 'default': config( + 'DATABASE_URL', + cast=db_url, + ) } EMAIL_USE_TLS = config('EMAIL_USE_TLS', cast=bool)