Not an avid django/python user but maybe consider keeping local, dev and prod in .env files and passing the variables into the settings.py file. That way any sensitive info is kept consistently in key value pair files and can be easily swapped. Might be inaccurately prescribed, it comes from node.js tinkering. Best of luck. 😁
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.