This util manage to load django settings from a config file that contain sensitive information such as cache, database and project passwords/secrets.
The util also check the permissions file to be safe, and the existence of the SECRET_KEY variable, if no file is found it will automatically create a file with a random SECRET_KEY value.
Add the method load_environment_file
into your code, an use it in your django
settings module load_environment_file('environment.ini')
Note that after that, all options in the django section in the file will be prefixed with DJANGO, and avaiable as enviroment variables.
[django]
test_var = Hello
Will be loaded as:
>>> import os
>>> print(os.environ.get('DJANGO_TEST_VAR'))
Hello