Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you use two different versions of Django for different projects on the same machine?

Tags:

django

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 :)

like image 765
sotangochips Avatar asked Jul 22 '09 01:07

sotangochips


1 Answers

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.

like image 133
Alex Martelli Avatar answered Sep 24 '22 15:09

Alex Martelli