重新启动在Apache + mod_python上运行的Django应用程序 [英] Restarting a Django application running on Apache + mod_python
问题描述
只是为了清楚,因为我看到有些人错了,我在说一个 / em>环境。对于开发,我当然使用Django的开发服务器。
如果可能的话,你应该切换到mod_wsgi。现在,这是推荐的方式为Django提供服务,而且很多在内存和服务器资源方面更有效率。
在mod_wsgi中,每个站点都有一个 .wsgi
文件关联它。要重新启动网站,只需触摸
相关文件,只有该代码将被重新加载。
I'm running a Django app on Apache + mod_python. When I make some changes to the code, sometimes they have effect immediately, other times they don't, until I restart Apache. However I don't really want to do that since it's a production server running other stuff too. Is there some other way to force that?
Just to make it clear, since I see some people get it wrong, I'm talking about a production environment. For development I'm using Django's development server, of course.
If possible, you should switch to mod_wsgi. This is now the recommended way to serve Django anyway, and is much more efficient in terms of memory and server resources.
In mod_wsgi, each site has a .wsgi
file associated with it. To restart a site, just touch
the relevant file, and only that code will be reloaded.
这篇关于重新启动在Apache + mod_python上运行的Django应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!