如何在Openshift上更新Django? [英] How do I update Django on Openshift?

查看:139
本文介绍了如何在Openshift上更新Django?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习在Openshift上部署Django。
现在我有一个python-2.7盒,并且正在运行Django 1.6
克隆在盒式磁带中的git repo是



git:/ /github.com/rancavil/django-openshift-quickstart.git( Github



我如何更新正在运行的webapp的Django版本?



我看过这个问题,只是解释一下更新一个墨盒,而我正在询问更新一个

解决方案

实现此目的的最简单方法是更改​​安装依赖项( install_requires 参数 setup())在 setup.py 中。而不是

  packages = ['Django <= 1.6',] 
pre>

如在墨盒默认值中您可以写

  packages = ['Django> = 1.7,<1.8',] 

获取最新版本的Django 1.7 。有关如何指定值的更多详细信息,请参见 Python打包用户指南



如果需要,您的下一个 git push 将会执行此文件,并更新包。


I'm learning to deploy Django on Openshift. Right now I have a python-2.7 cartridge up and running with Django 1.6 The git repo cloned in the cartridge is,

git://github.com/rancavil/django-openshift-quickstart.git (Github)

How can I update the Django version of a running webapp?

I've looked at this question that just explain about updating a cartridge, while I'm asking about updating the packages inside a cartridge while keeping the cartridge same as python-2.7.

解决方案

The easiest way to achieve this is to change the setup dependencies (install_requires parameter for setup ()) in setup.py. Instead of

packages = ['Django<=1.6',]

as in the cartridge default you could write

packages = ['Django>=1.7,<1.8',]

to get the latest version of Django 1.7. More details of how to specify values can be found in the Python Packaging User Guide.

With your next git push this file will be executed and the packages get updated, if required.

这篇关于如何在Openshift上更新Django?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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