复制/复制Django开发环境 [英] Replicating/reproducing the Django development environment

查看:191
本文介绍了复制/复制Django开发环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在和Django项目的朋友一起工作。该项目依赖于一些python模块。我有django和那些额外的依赖关系安装在一个virtualenv中。 django项目的代码位于可以检出/克隆的所有朋友访问的存储库中,然后向其提供代码。但是有没有办法在朋友的电脑中复制我在开发环境中的设置,也就是说,会安装所有附加的依赖项并使环境准备好部署?



我听说过zc.buildout。只是看看它没有太深。看起来很复杂还有其他方式来实现吗?我的朋友使用的开发环境从GNU / Linux到MS Windows。

解决方案

buildout.cfg:

  [buildout] 
parts = python

[python]
recipe = zc.recipe。 egg
eggs =
你的

依赖
这里
解释器= python

获取 bootstrap.py 。然后:

  $ python bootstrap.py 
$ bin / buildout
$ bin / python ...


I am working with my friends on a Django project. The project has dependencies on some python modules. I have django and those additional dependencies installed inside a virtualenv. The code of the django project is in a repository accessible to all the friends who can checkout/clone and then contribute code to it. But is there a way to replicate the setup that I have in my development environment in my friends' computers, i.e., something that will install all the additional dependencies and get the environment ready for deployment?

I have heard about zc.buildout. Just had a look at it without going too deep. It does appear complex. Are there other ways to achieve this? The development environments used by my friends vary from GNU/Linux to MS Windows.

解决方案

buildout.cfg:

[buildout]
parts = python

[python]
recipe = zc.recipe.egg
eggs =
    your
    egg
    dependencies
    here
interpreter = python

Get bootstrap.py. Then:

$ python bootstrap.py
$ bin/buildout
$ bin/python ...

这篇关于复制/复制Django开发环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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