如何在同一台机器上为不同的项目使用两个不同版本的Django? [英] How can you use two different versions of Django for different projects on the same machine?

查看:147
本文介绍了如何在同一台机器上为不同的项目使用两个不同版本的Django?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Mac OS X 10.5.7盒子上使用Django 1.0。它被安装到:



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



然而,那里是我喜欢用于我公司内部工具的django的开发版本(1.1)的一部分的功能。不幸的是,我不能只是更新到开发版本,因为我仍然需要开发我的生产代码的1.0版本。



有一个简单的方法(在Mac OSX上)有两个版本的Django安装?一旦安装1.1,我如何告诉一个给定的项目使用一个版本与另一个?



非常感谢您的帮助!



更新
感谢所有提出建议。 Virtualenv看起来像是要走的路,这里是一个关于Django如何使用它的博文: http://justindriscoll.us/2008/11/setting-up-django-development-virtual.html



SO再次救援:)

解决方案

zc.buildout (尤其是部署)和 virtualenv (尤其是发展)是Jacob Kaplan Moss在OSCON今天在现实世界中的Django教程中提出的最高建议,尽管他提到了许多其他工具 - 参见他的幻灯片 O'Reilly的网站


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

解决方案

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.

这篇关于如何在同一台机器上为不同的项目使用两个不同版本的Django?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆