简体   繁体   English

所以现在Django 1.2正式推出

[英]So now that Django 1.2 is officially out

Since I have Django 1.1x on my Debian setup - how can I use virtualenv or similar and not have it mess up my system's default django version which in turn would break all my sites? 因为我的Debian设置上有Django 1.1x - 我怎么能使用virtualenv或类似的东西而不会弄乱我的系统的默认django版本,这反过来会破坏我的所有网站?

Detailed instructions or a great tutorial link would very much be appreciated - please don't offer vague advice since I'm still a noob. 非常感谢详细的说明或很棒的教程链接 - 请不要提供模糊的建议,因为我还是一个菜鸟。

Currently I store all my django projects in ~/django-sites and I am using Apache2 + mod_wsgi to deploy. 目前我将所有django项目存储在〜/ django-sites中,我使用Apache2 + mod_wsgi进行部署。

If you have easy_install, or better yet pip installed, should be as easy as: 如果你有easy_install,或者更好的pip安装,应该像下面这样简单:

  1. easy_install/pip install virtualenv
  2. mkdir django1.2
  3. virtualenv django1.2

This will put the python binary in a bin folder inside the django1.2 folder. 这会将python二进制文件放在django1.2文件夹中的bin文件夹中。 Just use that python binary, and you've got a nice little self-contained environment. 只需使用那个python二进制文件,你就拥有了一个很好的小型自包含环境。 You can then install easy_install/pip into that environment, and then install django 1.2 as well, and hack away. 然后,您可以将easy_install / pip安装到环境中,然后安装django 1.2,然后进行攻击。

Since you are using mod_wsgi, make sure you read: 由于您使用的是mod_wsgi,请务必阅读:

http://code.google.com/p/modwsgi/wiki/VirtualEnvironments http://code.google.com/p/modwsgi/wiki/VirtualEnvironments

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM