settings database url
This commit is contained in:
@@ -84,9 +84,14 @@ WSGI_APPLICATION = 'creativeschool.wsgi.application'
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
|
||||
|
||||
DATABASE_URL = os.getenv("DATABASE_URL")
|
||||
|
||||
if not DATABASE_URL:
|
||||
raise RuntimeError("DATABASE_URL environment variable is not set")
|
||||
|
||||
DATABASES = {
|
||||
"default": dj_database_url.parse(
|
||||
os.environ["DATABASE_URL"],
|
||||
DATABASE_URL,
|
||||
conn_max_age=600,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user