I am using uWSGI to run a Django application on nginx. I have configured the server and all seems to be running well. What I would really like to be able to do is store the django secret key within the systems environment variables so it is not part of the settings.py file.

I know that somewhere within the uwsgi options there is the ability to pass through multiple environment settings; but I cannot find this. Can someone please tell me how this is done.

bumped to the homepage by Community 4 hours ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


Use the uwsgi_param PARAM_NAME 'param_value'; then access with request.environ['PARAM_NAME']

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.