Eey*_*ore 4 apache django mod-wsgi
我正在尝试自动重新加载我的django应用程序,该应用程序在我的本地Windows机器上使用apache + mod_wsgi.
我想知道在哪里添加以下文章中引用的代码:
http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode
def _restart(path):
_queue.put(True)
prefix = 'monitor (pid=%d):' % os.getpid()
print >> sys.stderr, '%s Change detected to \'%s\'.' % (prefix, path)
print >> sys.stderr, '%s Triggering Apache restart.' % prefix
import ctypes
ctypes.windll.libhttpd.ap_signal_parent(1)
Run Code Online (Sandbox Code Playgroud)
读:
http://blog.dscpl.com.au/2008/12/using-modwsgi-when-developing-django.html
它告诉您使用Django时确切放置文件的位置.您只需要在与Windows相关的源代码重新加载文档部分中进行每个人都指出的代码更改.另请阅读:
http://blog.dscpl.com.au/2009/02/source-code-reloading-with-modwsgi-on.html
这解释了第一个与Windows相关的变体.