10 ms·
Do you mind sharing your django.wsgi file? I'm trying to set this up right now for a site I'm working on. After looking throught the docs and some blog posts it
by phernandez 17y ago
Do you mind sharing your django.wsgi file? I'm trying to set this up right now for a site I'm working on. After looking throught the docs and some blog posts it wasn't clear to me how to hook up apache and virtualenv. Do you source in the env via the activate script? I feel like I'm missing something. Thanks.
- slig 17y agoHi, I've been using the one here: http://www.danceric.net/2009/03/26/django-virtualenv-and-mod_wsgi/ http://www.danceric.net/2009/03/26/django-virtualenv-and-mod...
- bad_user 17y agoBasically in the WSGI file (which is just python code) you need to insert the virtual-env site packages in sys.path, with something like this ... virtenvdir = '/path/to/virtual-env/lib/python2.5/site-packages/' import sys if virtenvdir not in sys.path: sys.path.insert(0, virtenvdir)