Heroku Database Settings Injection - How do I setup my dev django database?

前端 未结 5 1904
孤城傲影
孤城傲影 2021-01-30 04:32

I\'m trying to get my local dev django app to work after following these instructions on adding env database settings.

https://devcenter.heroku.com/articles/django-injec

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-30 04:53

    import dj_database_url

    DATABASES = {'default': dj_database_url.config(default='postgres://yourusername:yourpassword@yourhosturl:5432/yourdbname')}

    ** Replace bold string with your database settings if you are using local database then replace yourhosturl by localhost

提交回复
热议问题