tags:

views:

236

answers:

4

I'm currently using Django 1.0 on my Mac OS X 10.5.7 box. It's installed to:

/Library/Python/2.5/site-packages/django/

However, there are features that are part of the development release (1.1) of django that I'd love to use for internal tools at my company. Unfortunately I can't just update to the development version because I still need to develop on the 1.0 version for my production code.

Is there an easy way (on Mac OSX) to have two versions of Django installed? Once 1.1 is installed, how do I tell a given project to use one version vs. the other?

Many thanks for the help!

Update Thanks all for the suggestions. Virtualenv seems like the way to go, and here's a blog post on how to use it with Django specifically: http://justindriscoll.us/2008/11/setting-up-django-development-virtual.html

S.O. to the rescue yet again :)

A: 

virtualenv

Mark
A: 

Take a look at virtualenv http://pypi.python.org/pypi/virtualenv It helps you keep contained environments. Pinax uses it. http://www.pinaxproject.com

dar
+1  A: 

You may want to consider using something like Virtualenv. It allows you to set up multiple isolated Python environments. So, not only could you have multiple Djangos, but you could have different versions of Python running as well.

Zed Shaw created a screen cast of setting up Virtualenv, although not with Django specifically, (he shows how to get his mail software, Lamson, up and running). However, the concepts also work for setting up multiple versions of Django on the same machine with Virtualenv.

Ryan Duffield
+5  A: 

zc.buildout (esp. for deployment) and virtualenv (esp. for development) were Jacob Kaplan Moss's top suggestions at the "Django in the real world" tutorial he gave at OSCON today, though he did mention many other tools -- see his slides on O'Reilly's site.

Alex Martelli