如何重新加载与Apache Django项目新的更新,mod_wsgi的? [英] How to reload new update in Django project with Apache, mod_wsgi?

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

问题描述

我正在使用Django框架的项目。我主持与Apache + mod_wsgi的测试服务器。当我改变code的一些行,我上传文件,并在浏览器中测试它。但新的更改都不会显示,除非我重新加载/重启( /etc/init.d/apache2重装)。

I am making a project using the Django framework. I have hosted a test server with Apache+mod_wsgi. When I change some lines of code, I upload the file and test it in a browser. But the new changes are not shown unless I reload/restart (/etc/init.d/apache2 reload).

是否有任何其他的方式来加载/刷新新的变化,除了重装Apache的?

Is there any other way to reload/refresh new changes besides reloading Apache?

推荐答案

是的,触摸你的 WSGI 配置文件。

Yes, touch your wsgi configuration file.

对于我来说,我的服务器重新启动脚本是作为简单的触摸/srv/grove_project/conf/apache/django.wsgi
建立到你的服务器管理脚本和它是一个不错的优雅重启。

For me, my server restart script is as simple as touch /srv/grove_project/conf/apache/django.wsgi. Build it into your server management scripts and it's a nice graceful restart.

有关更多信息,当这适用于:<一href=\"https://$c$c.google.com/p/modwsgi/wiki/ReloadingSource$c$c\">https://$c$c.google.com/p/modwsgi/wiki/ReloadingSource$c$c

For more info and when this applies: https://code.google.com/p/modwsgi/wiki/ReloadingSourceCode

从该名男子自己:这只是与的mod_wsgi 工作在守护进程模式

From The Man himself: this only works with mod_wsgi in daemon mode.

这篇关于如何重新加载与Apache Django项目新的更新,mod_wsgi的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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