I know there is way to do by creating local_settings.py and production_settings.py but don't know how to use it!
Can anyone help me out through this problem?
I know there is way to do by creating local_settings.py and production_settings.py but don't know how to use it!
Can anyone help me out through this problem?
Answering your question. You have to export environment variable first.
$ export secret_key=wioj23423jij2
And in your code you can get the secret key using
import os
secret_key = os.environ.get('secret_key')