So in being a newb to Django I accidentally committed my secret key to a private repository that I have for my website. Considering that I intend to use this site for business purposes, I want to make sure that it is secure as possible. Do I need to generate a whole new Django Key? Or could I possibly just edit lets say, 10 characters of the secret key, add the edited secret key to my .env file, add the .env to my .gitignore file and call it a day?
I recognize this is not the best approach. I will most likely completely generate a new secret key but I thought this might be an effective quick fix.
I figure that by doing it this way the new secret key is still randomly generated and the old one is still available on github but useless to anyone who happens to scrape it.
FYI I am using python-decouple with a .env file which is where I save all my secret variables (aws info, secret key, db info, etc.). I have separate settings files (production.py, development.py, common_settings.py) where both production.py and development.py import all of the data from common_settings.py. I just happened to forget to delete the original settings.py file before I made my first commit.