Will making a Django website public on github let others get the data in its database ? If so how to prevent it?
The code itself wouldn't be enough to get access to the database. For that you need the db name and password, which shouldn't be in your git repo at all.
On Heroku you use environment variables - which are set automatically by the postgres add-on - along with the dj_database_url library which turns that into the relevant values in the Django DATABASES setting.
I have a locally made Django website and I hosted it on Heroku, at the same time I push changes to anathor github repo. I am using built in Database to store data. Will other users be able to get the data that has been entered in the database from my repo (like user details) ?
If so how to prevent it from happening ? Solutions like adding files to .gitignore will also prevent pushing to Heroku.