I'd like to know how I can maintain sessions while developing on my local machine (django, apache, mod-wsgi).
Each time I make updates to python code I need to restart Apache for the changes to take effect.
-
You only need to
touchyour WSGI script for the changes to take effect. -
Put this in your Apache conf file.
MaxRequestsPerChild 1This will force Apache to reload the python files after each request.
Eeyore : I have this - it won't reload python files or keep the sessions. -
Read the documentation. See:
http://code.google.com/p/modwsgi/wiki/ReloadingSourceCodeIt explains in a great amount of detail about source code reloading in Apache/mod_wsgi.
Just touching the WSGI script file will not do anything if you aren't use mod_wsgi in the correct mode.
And yes you can use Apache/mod_wsgi as a development server if you set it up with daemon mode and code change monitor as documented in that page.
As for MaxRequestsPerChild, that is not recommended and will only work in embedded mode of mod_wsgi and not in daemon mode.
0 comments:
Post a Comment