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

前端 未结 5 1797
孤城傲影
孤城傲影 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:58

    You can just add your dev settings to the default values like this...

    import dj_database_url
    DATABASES = {'default': dj_database_url.config(default='postgres://foo:bar@localhost:5432/db')}
    

提交回复
热议问题