[Fixed]-How to deploy my django project online with keeping my settings of database and email password private?

1👍

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')

Leave a comment