Django Book 翻译
菜单>:
TOC
返回
原文:
Because mod_python caches loaded Python code, when deploying Django sites on mod_python youll need to restart Apache each time you make changes to your code. This can be a hassle, so heres a quick trick to avoid it: just add ``MaxRequestsPerChild 1`` to your config file to force Apache to reload everything for each request. But dont do that on a production server, or well revoke your Django privileges.
翻译:
因为 mod_python 缓存预载入了 Python 的代码,当在 mod_python 上发布 Django 站点时,你每 改动了一次代码都需要重启 Apache 一次。这还真是件麻烦事,所以这有个办法来避免它:只要 加入 ``MaxRequestsPerChild 1`` 到配置文件中强制 Apache 在每个请求时都重新载入所有的 代码。但是不要在产品服务器上使用这个指令,这会撤销 Django 的特权。
备注:
译者: