[Django]-Running Django 1.5 and Django 1.3 on the same server

9👍

virtualenv package will help:

virtualenv is a tool to create isolated Python environments.

It’s somewhat tricky to activate virtualenv in the wsgi file, but there is a lot of info on the subject out there:

👤alecxe

3👍

Yes, use virtualenv, and in your wsgi script add this:

import os, sys    
sys.path.insert(0, '/path/to/mysite') #where your site is
activate_this = '/path/to/djangoenv/bin/activate_this.py' #virtualenv with proper Django version
execfile(activate_this, dict(__file__=activate_this))
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
👤adamr

Leave a comment