4
.bashrc
only affects bash login shells. Init scripts are not affected in any way by it.
You should copy the export SECRET_KEY=...
line to the top of your init script.
6
You need to do:
export SECRET_KEY=secret_string
in your .bashrc
. If you just do:
SECRET_KEY=secret_string
It’s only available in current process, but when you run django server/shell, the subprocess has no idea of this variable. export
make the variable available in subprocesses as well.
- [Django]-Django can't process non-ascii symbols
- [Django]-Django signals. how to create a unique dispatch id?
- [Django]-How to add custom field in manytomany through table in Django
Source:stackexchange.com