unable to make RDS queries on heroku

你。 提交于 2019-12-05 21:14:09

I had a similar issue, also for a Django on Heroku app. I used the heroku-django-template to create my app. In settings.py, the default database is overwritten by the environment variable DATABASE_URL.

You can either disable that in the settings.py or set the env var to the correct value.

The Error is because of table doesn't exists in Database, that means you need to migrate the database models. For Further reference read django migrations here

Database migrations in heroku is done by this way, specify the line in Procfile file.

release: python manage.py migrate
web: gunicorn col.wsgi --log-file -

So Whenever you deploy a new code, heroku will automatically migrate the DB models. For further reference, check here. let me know if this works.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!