I'm really having a hard time how to hide my sensitive material in my django settings.py I tried creating a seperate settings file for local and production found here people advise and then stop midway. I also tried to create a file called secrets.py in my core file where my wsgi and settings are etc and tried to do this
DEBUG = True
if DEBUG:
from .secrets import SECRET_KEY_LO
this = SECRET_KEY_LO
SECRET_KEY = this
else:
SECRET_KEY = os.environ['SECRET_KEY']
but that didn't work. What is the professional programming way to do it? So I don't have to manually have to change DEBUG true to DEBUG false all the time it feels very novice and it can be verry annoying