i've got two web apps. One was developed using Django 1.0 and the other using Django 1.4. How can I run both apps in the same apache2 server using two versions of django? Somebody told me something about virtualenv ... I'm using mod_wsgi.
You should definitely go with virtualenv.
This is how you can check if you already have virtualenv installed:
If you don't have virtualenv installed, you can install it like this:
If that gives you an error, you probably don't have pip yet. You can install it using:
Once virtualenv is installed you can create separated virtual Python environments, one per Django installation, like this:
I recommend running this command in the project folder of each app. If you do so, you get a folder called 'env' which will contain the virtual Python environment. Every time you want to start working with the virtual environment you can issue this command:
Your prompt should indicate that you are running the environment by looking something like this:
You can leave the virtualenv by typing:
If you have come this far you can start installing environment-specific versions of Python packages like this (in an activated environment):
This will install Django version 1.0 inside the current virtual environment. You can see if it worked by issuing:
This should result in something like:
You can now deactivate this environment, activate the other environment, and install Django 1.4 like this:
Hope this helps!
Have you read any of the available documentation, including:
http://code.google.com/p/modwsgi/wiki/VirtualEnvironments http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide#Delegation_To_Daemon_Process http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?