瀏覽代碼

tweak db settings for heroku

David Ray 8 年之前
父節點
當前提交
0204545966
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      bakerydemo/settings/heroku.py

+ 2 - 2
bakerydemo/settings/heroku.py

@@ -15,8 +15,8 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
 # BASE_URL required for notification emails
 # BASE_URL required for notification emails
 BASE_URL = 'http://localhost:8000'
 BASE_URL = 'http://localhost:8000'
 
 
-DATABASES = {'default': dj_database_url.config(default='postgres://postgres@localhost:5432/wagtaildemo')}
-
+db_from_env = dj_database_url.config(conn_max_age=500)
+DATABASES['default'].update(db_from_env)
 
 
 try:
 try:
     from .local import *
     from .local import *