I am trying to configure nginx+uWSGI to serve my Django application.
When I put environment variables into myapp_uwsgi.ini:
myapp_uwsgi.ini
Another approach is using configuration management systems such as Salt or Ansible.
With them one can create Jinja templates for both uWSGI and Django with {{ variables }} defined in one place.