I have set up Django on Windows 7 on Apache/mod_wsgi. I need to stop, and then then start the server every time I change any python code. Is there a way to avoid it?
This doesn't happen with javascript/php changes, i.e., no apache restart required for seeing effect of changed code. A push in the right direction would help greatly. Thanks!
You don't have to restart Apache. Just modify the wsgi file (in an UNIX environment, you could use touch myfile.wsgi
) and it will be reloaded. In other words, just make sure the last modification date of your wsgi file is updated, even if the file contents itself is not.
P.S. I'm assuming you're running in daemon mode. If you're using embedded mode, then my suggestion won't help you, and I dunno if it's possible to do that at all... See also this question.
Edit: sorry, I didn't know daemon mode was only supported on UNIX. In that case, maybe the links in the other question will help, but I can't tell for sure, since I've got no experience with it.
Read the official documentation about it at:
http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With