I’m very new to the Django framework. I am writing an app, and I would like to set a number of environment variables before the server is run. Is there a standardized approach to doing this (i.e. a setup script that is run before the server startup is completed)?
Share
It depends upon webserver you want to use. For example apache with mod_wsgi you can add your variables in the
os.environ. Refer WSGI IntegrationWithDjangoHowever, in general updating
os.environinsetttings.pywould also work.