[Django]-Setting up Apache and Python WSGI to use VirtualEnv

10👍

In my app.wsgi file I have something like this. You will need to change it to put to where your virtual env is located, mine is under /opt/ve/ve_name/ in this example.

import os
# activate virtualenv
activate_this = os.path.expanduser("/opt/ve/ve_name/bin/activate_this.py")
execfile(activate_this, dict(__file__=activate_this))

Leave a comment