Browse Source

tweak db settings for heroku

David Ray 8 năm trước cách đây
mục cha
commit
0204545966
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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 = '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:
     from .local import *