Django测试环境
我已经部署了几个 Django 驱动的站点,大部分是“概念”的东西;不严重。现在我准备部署一个真实交易网站(用于我兄弟的医疗实践),并希望确保我做得正确。
我最关心的是测试环境。我一直在通过维护两个单独的文件夹来实现这一点,其中包含站点的不同 Mercurial 副本,然后更新开发分支,与发布分支合并,然后上传到服务器(Webfaction)。
您如何管理 Django 项目的测试环境?
I have deployed several Django-driven sites, mostly "concept" stuff; nothing serious. Now I'm ready to deploy a real-deal site (for my brother's medical practice), and would like to ensure that I'm doing it correctly.
My central concern, is the testing environment. I had been doing it by maintaining two separate folders with different Mercurial copies of a site, then updating the development branch, merging with the release branch, and then uploading to the server (Webfaction).
How do you manage testing environment for your Django projects?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所有开发都是在我的本地计算机上完成的。我对多个项目使用 virtualenv (和 virtualenvwrapper)。使用 virtualenv,您可以拥有同一软件的多个版本,而不必“破坏”可能依赖于某个版本的其他代码。我使用 pip 将适当的库/应用程序下载到这些单独的环境中。对于每个项目(以及环境),我都有一个 Mercurial 存储库。如果新开发通过了所有单元测试并且按预期工作,我会将其发送到 VCS。一旦进入 VCS,代码就会被同事审查。
All development is done on my local machine. I use virtualenv (and virtualenvwrapper) for the multiple projects. With virtualenv, you can have several versions of the same software without having to 'break' other code that may depend on a certain version. I use pip for downloading the proper libraries/applications into these separate environments. For each project (and therefore environment), I have a mercurial repository. If the new development passes all unit tests and works as expected, I send it up to the VCS. Once in the VCS, the code gets reviewed by colleagues.