Fakultas Ilmu Komputer UI

Commit ef9c24da authored by Putu Agastya's avatar Putu Agastya
Browse files

[CHORES] Set default database

parent a520ec33
......@@ -91,11 +91,16 @@ if is_local:
'PORT': '',
}
}
if is_heroku:
elif is_heroku:
database_url = os.getenv("DATABASE_URL")
DATABASES["default"] = dj_database_url.parse(database_url, conn_max_age=600)
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static"), ]
......
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