Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django connect to a db on heroku

#Run the following command to check that your db url is set properly:
$ heroku config
#In the settings.py
import dj_database_url

DATABASES['default'] = dj_database_url.config(conn_max_age=600)
Source by bennettgarner.medium.com #
 
PREVIOUS NEXT
Tagged: #django #connect #db #heroku
ADD COMMENT
Topic
Name
9+6 =