Fakultas Ilmu Komputer UI

Commit f840d90c authored by Rahmania Astrid Mochtar's avatar Rahmania Astrid Mochtar
Browse files

try using dj-database-url package

parent 443203e3
Pipeline #21095 failed with stages
in 53 minutes and 46 seconds
......@@ -2,4 +2,5 @@ astroid==2.2.5
Django==2.1.7
selenium==3.141.0
gunicorn==19.9.0
psycopg2==2.8.3
\ No newline at end of file
psycopg2==2.8.3
dj-database-url==0.5.0
\ No newline at end of file
import dj_database_url
"""
Django settings for superlists project.
......@@ -80,15 +81,13 @@ WSGI_APPLICATION = 'superlists.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'todo_list', # os.environ.get('DB_NAME', ''),
'USER': 'rahmania', # os.environ.get('DB_USER', ''),
'PASSWORD': 'asdasd123', # os.environ.get('DB_PASS', ''),
'HOST': 'localhost',
'PORT': '5432'
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)
# Password validation
# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment