I created a django project and want to share it with my team members, however in the settings files it contains some passwords for the database etc. Of course when I push it to GitHub Git Guardian tells me that I have some sensitive information such as DB credentials (username and password) and Django's Secret Key. Now, I know I basically delete those information and push it to GitHub. But I wonder if there is a more sophisticated method to push those kind of projects or a convenient way?
Thank you very much.
Use the decouple package, then create a .env file where you can add your passwords. Add the .env file to gitignore. Now your colleagues have to add a .env file themself and add the passwords there. Heres a good tutorial on how to do this https://dontrepeatyourself.org/post/how-to-use-python-decouple-with-django/